summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-gluster_cli.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-gluster_cli.c
parent8ede6b7dc09aa636f87147ab432a137c209e8aca (diff)
downloadwireshark-8ed7a73e22c049a2e013bb436e599bff41fc5b9b.tar.gz
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-gluster_cli.c')
-rw-r--r--epan/dissectors/packet-gluster_cli.c43
1 files changed, 11 insertions, 32 deletions
diff --git a/epan/dissectors/packet-gluster_cli.c b/epan/dissectors/packet-gluster_cli.c
index 05042950c2..7198668b6d 100644
--- a/epan/dissectors/packet-gluster_cli.c
+++ b/epan/dissectors/packet-gluster_cli.c
@@ -76,11 +76,9 @@ static int
gluster_cli_2_common_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- gchar* errstr= NULL;
-
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree);
offset = dissect_rpc_string(tvb, tree, hf_gluster_op_errstr, offset,
- &errstr);
+ NULL);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_dict, offset);
return offset;
@@ -90,15 +88,12 @@ static int
gluster_cli_2_probe_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- gchar* hostname = NULL;
- gchar* errstr = NULL;
-
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_port, offset);
offset = dissect_rpc_string(tvb, tree, hf_gluster_hostname, offset,
- &hostname);
+ NULL);
offset = dissect_rpc_string(tvb, tree, hf_gluster_op_errstr, offset,
- &errstr);
+ NULL);
return offset;
}
@@ -107,10 +102,8 @@ static int
gluster_cli_2_probe_call(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- gchar* hostname = NULL;
-
offset = dissect_rpc_string(tvb, tree, hf_gluster_hostname, offset,
- &hostname);
+ NULL);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_port, offset);
return offset;
@@ -120,11 +113,9 @@ static int
gluster_cli_2_deprobe_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- gchar* hostname = NULL;
-
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree);
offset = dissect_rpc_string(tvb, tree, hf_gluster_hostname, offset,
- &hostname);
+ NULL);
return offset;
}
@@ -133,10 +124,8 @@ static int
gluster_cli_2_deprobe_call(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- gchar* hostname = NULL;
-
offset = dissect_rpc_string(tvb, tree, hf_gluster_hostname, offset,
- &hostname);
+ NULL);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_port, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_flags, offset);
@@ -147,9 +136,7 @@ static int
gluster_cli_2_fsm_log_call(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- gchar* name = NULL;
-
- offset = dissect_rpc_string(tvb, tree, hf_gluster_wd, offset, &name);
+ offset = dissect_rpc_string(tvb, tree, hf_gluster_wd, offset, NULL);
return offset;
}
@@ -158,10 +145,8 @@ static int
gluster_cli_2_getwd_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- gchar* wd = NULL;
-
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree);
- offset = dissect_rpc_string(tvb, tree, hf_gluster_wd, offset, &wd);
+ offset = dissect_rpc_string(tvb, tree, hf_gluster_wd, offset, NULL);
return offset;
}
@@ -179,10 +164,8 @@ static int
gluster_cli_2_mount_call(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- gchar* label = NULL;
-
offset = dissect_rpc_string(tvb, tree, hf_gluster_label, offset,
- &label);
+ NULL);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_gluster_dict, offset);
return offset;
@@ -192,10 +175,8 @@ static int
gluster_cli_2_mount_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- gchar* path = NULL;
-
offset = gluster_dissect_common_reply(tvb, offset, pinfo, tree);
- offset = dissect_rpc_string(tvb, tree, hf_gluster_path, offset, &path);
+ offset = dissect_rpc_string(tvb, tree, hf_gluster_path, offset, NULL);
return offset;
}
@@ -204,10 +185,8 @@ static int
gluster_cli_2_umount_call(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- gchar* path = NULL;
-
offset = dissect_rpc_uint32(tvb, tree, hf_gluster_lazy, offset);
- offset = dissect_rpc_string(tvb, tree, hf_gluster_path, offset, &path);
+ offset = dissect_rpc_string(tvb, tree, hf_gluster_path, offset, NULL);
return offset;
}