aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-07-06 17:11:25 -0700
committerGuy Harris <guy@alum.mit.edu>2014-07-07 00:11:59 +0000
commit0a2f6fc01a9170ffc29570436c5496c046612a56 (patch)
tree1fff50eb1d84d731558967bd241ebed6313a57e1
parent4d58904a09c972cff7a114f33db2532d958997cb (diff)
Squelch some compiler warnings.
Change-Id: I768bf577b3871171ab33f080c5a0099ac06718ce Reviewed-on: https://code.wireshark.org/review/2906 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c4
-rw-r--r--epan/dissectors/packet-ipp.c19
-rw-r--r--epan/dissectors/packet-rsvp.c6
3 files changed, 15 insertions, 14 deletions
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index 18ee5b1e1c..abb686fcdc 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -4020,8 +4020,8 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
pco_item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_pco_pid, tvb, curr_offset, 2, (guint32)prot,
"%s (0x%04x)",
link_dir ?
- rval_to_str((guint32)prot, gsm_a_sm_pco_net2ms_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")) :
- rval_to_str((guint32)prot, gsm_a_sm_pco_ms2net_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")),
+ rval_to_str_const((guint32)prot, gsm_a_sm_pco_net2ms_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")) :
+ rval_to_str_const((guint32)prot, gsm_a_sm_pco_ms2net_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")),
(guint32)prot);
pco_tree = proto_item_add_subtree(pco_item, ett_sm_pco);
diff --git a/epan/dissectors/packet-ipp.c b/epan/dissectors/packet-ipp.c
index c2f35e5a28..007933a260 100644
--- a/epan/dissectors/packet-ipp.c
+++ b/epan/dissectors/packet-ipp.c
@@ -186,7 +186,7 @@ dissect_ipp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean is_request = (pinfo->destport == pinfo->match_uint);
/* XXX - should this be based on the HTTP header? */
guint16 status_code;
- const gchar *status_fmt;
+ const gchar *status_type;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPP");
if (is_request)
@@ -212,31 +212,32 @@ dissect_ipp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (status_code & STATUS_TYPE_MASK) {
case STATUS_SUCCESSFUL:
- status_fmt = "Successful (0x%04x)";
+ status_type = "Successful";
break;
case STATUS_INFORMATIONAL:
- status_fmt = "Informational (0x%04x)";
+ status_type = "Informational";
break;
case STATUS_REDIRECTION:
- status_fmt = "Redirection (0x%04x)";
+ status_type = "Redirection";
break;
case STATUS_CLIENT_ERROR:
- status_fmt = "Client error (0x%04x)";
+ status_type = "Client error";
break;
case STATUS_SERVER_ERROR:
- status_fmt = "Server error (0x%04x)";
+ status_type = "Server error";
break;
default:
- status_fmt = "Unknown (0x%04x)";
+ status_type = "Unknown";
break;
}
- proto_tree_add_text(ipp_tree, tvb, offset, 2, "Status-code: %s",
- val_to_str(status_code, status_vals, status_fmt));
+ proto_tree_add_text(ipp_tree, tvb, offset, 2, "Status-code: %s (%s)",
+ status_type,
+ val_to_str(status_code, status_vals, "0x804x"));
}
offset += 2;
diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c
index 1a68be4c7e..109dddf880 100644
--- a/epan/dissectors/packet-rsvp.c
+++ b/epan/dissectors/packet-rsvp.c
@@ -3988,9 +3988,9 @@ dissect_rsvp_label_request(proto_item *ti, proto_tree *rsvp_object_tree,
rval_to_str(lsp_enc, gmpls_lsp_enc_rvals, "Unknown (%d)"),
rval_to_str(tvb_get_guint8(tvb,offset2+1),
gmpls_switching_type_rvals, "Unknown (%d)"),
- rval_to_str(l3pid, gmpls_gpid_rvals,
- val_to_str(l3pid, etype_vals,
- "Unknown (0x%04x)")));
+ rval_to_str_const(l3pid, gmpls_gpid_rvals,
+ val_to_str(l3pid, etype_vals,
+ "Unknown (0x%04x)")));
break;
}