aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mount.c
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/dissectors/packet-mount.c
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/dissectors/packet-mount.c')
-rw-r--r--epan/dissectors/packet-mount.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-mount.c b/epan/dissectors/packet-mount.c
index 396abcd522..242be713ef 100644
--- a/epan/dissectors/packet-mount.c
+++ b/epan/dissectors/packet-mount.c
@@ -159,7 +159,7 @@ static int
dissect_mount_dirpath_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- char *mountpoint=NULL;
+ const char *mountpoint=NULL;
if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){
rpc_call_info_value *civ=pinfo->private_data;
@@ -217,8 +217,8 @@ dissect_mountlist(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
proto_item* lock_item = NULL;
proto_tree* lock_tree = NULL;
int old_offset = offset;
- char* hostname;
- char* directory;
+ const char* hostname;
+ const char* directory;
if (tree) {
lock_item = proto_tree_add_item(tree, hf_mount_mountlist, tvb,
@@ -294,7 +294,7 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
int groups_offset;
proto_item* groups_item = NULL;
proto_item* groups_tree = NULL;
- char* directory;
+ const char* directory;
group_name_list[0]=0;
group_names_len=0;
@@ -583,7 +583,7 @@ dissect_sgi_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_
proto_item* exportlist_item = NULL;
proto_tree* exportlist_tree = NULL;
int old_offset = offset;
- char* directory, *options;
+ const char* directory, *options;
if (tree) {
exportlist_item = proto_tree_add_item(tree, hf_mount_exportlist,