aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipp.c
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2014-08-13 14:18:16 +0200
committerJörg Mayer <jmayer@loplof.de>2014-08-13 12:19:29 +0000
commit633f1562ad2d8270c2710d1c6611362b3a516615 (patch)
tree04abac4d541280800d308daa4789a489c075284a /epan/dissectors/packet-ipp.c
parentea8738306e026c06acfe1ce8840bda2d4f9b3f8a (diff)
Fix warning when compiling with -O3:
/home/jmayer/work/wireshark/git/epan/dissectors/packet-ipp.c: In function ‘dissect_ipp’: /home/jmayer/work/wireshark/git/epan/dissectors/packet-ipp.c:583:78: error: ‘name_val’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if ((name_length > 5) && name_val && !strcmp(name_val+name_length-5, "-time")) { ^ /home/jmayer/work/wireshark/git/epan/dissectors/packet-ipp.c:557:11: note: ‘name_val’ was declared here char *name_val; ^ Change-Id: I5e49596010572b285e4ca8f210cdcf49d56bfc10 Reviewed-on: https://code.wireshark.org/review/3572 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'epan/dissectors/packet-ipp.c')
-rw-r--r--epan/dissectors/packet-ipp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ipp.c b/epan/dissectors/packet-ipp.c
index 007933a260..7e27f1b3b8 100644
--- a/epan/dissectors/packet-ipp.c
+++ b/epan/dissectors/packet-ipp.c
@@ -554,7 +554,7 @@ add_integer_value(const gchar *tag_desc, proto_tree *tree, tvbuff_t *tvb,
int offset, int name_length, int value_length, guint8 tag)
{
guint8 bool_val;
- char *name_val;
+ char *name_val = NULL;
offset = add_value_head(tag_desc, tree, tvb, offset, name_length,
value_length, &name_val);