diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-12-26 05:57:06 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-12-26 05:57:06 +0000 |
commit | 8ed7a73e22c049a2e013bb436e599bff41fc5b9b (patch) | |
tree | ad4a4cc6fb4ff4d3e3ffe3a3f8e3d056e441ae46 /epan/dissectors/packet-rpc.h | |
parent | 8ede6b7dc09aa636f87147ab432a137c209e8aca (diff) |
Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().
Change some data types to avoid those implicit conversion warnings.
When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.
Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers. Cast
away those warnings in some cases where an API we don't control forces
us to do so.
Enable a bunch of additional warnings by default. Note why at least
some of the other warnings aren't enabled.
randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.
If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.
svn path=/trunk/; revision=46748
Diffstat (limited to 'epan/dissectors/packet-rpc.h')
-rw-r--r-- | epan/dissectors/packet-rpc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rpc.h b/epan/dissectors/packet-rpc.h index 32d30f56b0..82711f7a94 100644 --- a/epan/dissectors/packet-rpc.h +++ b/epan/dissectors/packet-rpc.h @@ -151,19 +151,19 @@ extern unsigned int rpc_roundup(unsigned int a); extern int dissect_rpc_bool(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset); extern int dissect_rpc_string(tvbuff_t *tvb, - proto_tree *tree, int hfindex, int offset, char **string_buffer_ret); + proto_tree *tree, int hfindex, int offset, const char **string_buffer_ret); int dissect_rpc_opaque_data(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo, int hfindex, gboolean fixed_length, guint32 length, - gboolean string_data, char **string_buffer_ret, + gboolean string_data, const char **string_buffer_ret, dissect_function_t *dissect_it); extern int dissect_rpc_data(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset); extern int dissect_rpc_bytes(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset, guint32 length, - gboolean string_data, char **string_buffer_ret); + gboolean string_data, const char **string_buffer_ret); extern int dissect_rpc_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, dissect_function_t *rpc_list_dissector); extern int dissect_rpc_array(tvbuff_t *tvb, packet_info *pinfo, |