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/gcp.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/gcp.h')
-rw-r--r-- | epan/gcp.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/gcp.h b/epan/gcp.h index 7e24101365..715d1dc733 100644 --- a/epan/gcp.h +++ b/epan/gcp.h @@ -168,7 +168,7 @@ typedef struct _gcp_terms_t { typedef struct _gcp_cmd_t { guint offset; - gchar* str; + const gchar* str; gcp_cmd_type_t type; gcp_terms_t terms; struct _gcp_msg_t* msg; @@ -197,8 +197,8 @@ extern gcp_cmd_t* gcp_cmd(gcp_msg_t* m, gcp_trx_t* t, gcp_ctx_t* c, gcp_cmd_type extern gcp_term_t* gcp_cmd_add_term(gcp_msg_t* m, gcp_trx_t* tr, gcp_cmd_t* c, gcp_term_t* t, gcp_wildcard_t wildcard, gboolean persistent); extern void gcp_analyze_msg(proto_tree* gcp_tree, tvbuff_t* gcp_tvb, gcp_msg_t* m, gcp_hf_ett_t* ids); -extern gchar* gcp_cmd_to_str(gcp_cmd_t* c, gboolean persistent); -extern gchar* gcp_msg_to_str(gcp_msg_t* m, gboolean persistent); +extern const gchar* gcp_cmd_to_str(gcp_cmd_t* c, gboolean persistent); +extern const gchar* gcp_msg_to_str(gcp_msg_t* m, gboolean persistent); #define gcp_cmd_set_error(c,e) (c->error = e) #define gcp_trx_set_error(t,e) (t->error = e) |