aboutsummaryrefslogtreecommitdiffstats
path: root/epan/to_str.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-12-26 05:57:06 +0000
committerGuy Harris <guy@alum.mit.edu>2012-12-26 05:57:06 +0000
commit8ed7a73e22c049a2e013bb436e599bff41fc5b9b (patch)
treead4a4cc6fb4ff4d3e3ffe3a3f8e3d056e441ae46 /epan/to_str.h
parent8ede6b7dc09aa636f87147ab432a137c209e8aca (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/to_str.h')
-rw-r--r--epan/to_str.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/to_str.h b/epan/to_str.h
index cf1dae30d8..c86e0b17b0 100644
--- a/epan/to_str.h
+++ b/epan/to_str.h
@@ -50,17 +50,17 @@ struct e_in6_addr;
extern gchar* ep_address_to_str(const address *);
extern gchar* se_address_to_str(const address *);
extern void address_to_str_buf(const address *addr, gchar *buf, int buf_len);
-extern gchar* bytestring_to_str(const guint8 *, const guint32, const char);
-extern gchar* ether_to_str(const guint8 *);
-extern gchar* tvb_ether_to_str(tvbuff_t *tvb, const gint offset);
-extern gchar* ax25_to_str(const guint8 *);
+extern const gchar* bytestring_to_str(const guint8 *, const guint32, const char);
+extern const gchar* ether_to_str(const guint8 *);
+extern const gchar* tvb_ether_to_str(tvbuff_t *tvb, const gint offset);
+extern const gchar* ax25_to_str(const guint8 *);
extern gchar* get_ax25_name(const guint8 *);
extern const gchar* ip_to_str(const guint8 *);
extern const gchar* tvb_ip_to_str(tvbuff_t *tvb, const gint offset);
extern void ip_to_str_buf(const guint8 *ad, gchar *buf, const int buf_len);
-extern gchar* fc_to_str(const guint8 *);
+extern const gchar* fc_to_str(const guint8 *);
extern gchar* fcwwn_to_str (const guint8 *);
-extern gchar* tvb_fc_to_str(tvbuff_t *tvb, const gint offset);
+extern const gchar* tvb_fc_to_str(tvbuff_t *tvb, const gint offset);
extern gchar* tvb_fcwwn_to_str (tvbuff_t *tvb, const gint offset);
extern gchar* ip6_to_str(const struct e_in6_addr *);
extern gchar* tvb_ip6_to_str(tvbuff_t *tvb, const gint offset);