diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-01-10 11:39:43 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-01-10 19:40:33 +0000 |
commit | 531a9f0eab2c4cbc23e57835601d0179e7ba65a8 (patch) | |
tree | 9e074f9952ab18e2e8b930dcb18d8d0dba614e46 /epan | |
parent | 51acf1685b3a982f0502f6540f9ab00f543e8270 (diff) |
Squelch a compiler warning.
The clang I'm using warns about a non-constant format string in
val_to_str_ext() calls; get rid of the unknown_format variable and,
instead, make two different proto_item_append_text() calls with
different format arguments in the val_to_str_ext()-call arguments.
Change-Id: Id668efe666634798c278958bd7e6d790ec476539
Reviewed-on: https://code.wireshark.org/review/6479
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-bthci_cmd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c index d163343bfc..13c280aa5e 100644 --- a/epan/dissectors/packet-bthci_cmd.c +++ b/epan/dissectors/packet-bthci_cmd.c @@ -3031,7 +3031,6 @@ dissect_bthci_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat proto_tree *opcode_tree; gint hfx; bluetooth_data_t *bluetooth_data; - const gchar *unknown_format; /* Reject the packet if data is NULL */ if (data == NULL) @@ -3077,11 +3076,10 @@ dissect_bthci_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat ogf = (guint8) (opcode >> 10); if (ogf == HCI_OGF_VENDOR_SPECIFIC) - unknown_format = "Vendor Command 0x%04x"; + proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Vendor Command 0x%04x")); else - unknown_format = "Unknown 0x%04x"; + proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x")); - proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, unknown_format)); col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_CMD"); |