aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-epl.c
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2017-06-02 06:12:31 +0200
committerGuy Harris <guy@alum.mit.edu>2017-06-02 07:42:11 +0000
commit5a06efc29d8a850571ca7cee16437900f3694fbb (patch)
tree1a4f447d7277a9acce1bbf1dcaf477555facb607 /epan/dissectors/packet-epl.c
parentae1aed917bc856f391bbfc8786923c31de6097b9 (diff)
packet-epl.c: Fixup missing initializer warnings
macOS Buildbot doesn't like {0} (probably because GNU C already provides {} exactly for the purpose of initializing all members to zero/NULL/0.0.. etc) Affected local type definitions now have a static intializer macro that uses the correct amount of zeroes and braces (similar to PTHREAD_MUTEX_INITIALIZER) Global type definitions have a memset to zero (Which isn't strictly correct, but as the platforms we support all have all-bits-zero-nulls and IEEE 754 floats, it should be good enough. A separate change will attempt to disable -Wmissing-field-initializers -Wmissing-braces globally and hopefully make these workarounds unnecessary. Change-Id: I30b0f679bbb8adb2dd7269c9f3bc19732e48212b Reviewed-on: https://code.wireshark.org/review/21887 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-epl.c')
-rw-r--r--epan/dissectors/packet-epl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c
index eb6a210e7f..dca81fb8eb 100644
--- a/epan/dissectors/packet-epl.c
+++ b/epan/dissectors/packet-epl.c
@@ -1333,6 +1333,8 @@ struct object_mapping {
const char *index_name;
const char *title;
};
+/* XXX hopefully temporary till -Wmissing-field-initializers and -Wmissing-braces are ignored */
+#define OBJECT_MAPPING_INITIALIZER { { 0, 0 }, { 0, 0 }, 0, 0, 0, { 0, 0 }, 0, 0, 0 }
#define CONVO_FOR_RESPONSE 1
#define CONVO_FOR_REQUEST 2
@@ -1708,7 +1710,7 @@ static const struct epl_datatype {
#endif
{ "NETTIME", &hf_epl_od_time, ENC_TIME_TIMESPEC, 8 },
- { NULL, NULL }
+ { 0, 0, 0, 0 }
};
@@ -4130,7 +4132,7 @@ dissect_object_mapping(struct profile *profile, wmem_array_t *mappings, proto_tr
{
proto_item *ti_obj, *ti_subobj, *psf_item;
proto_tree *psf_tree;
- struct object_mapping map = {0};
+ struct object_mapping map = OBJECT_MAPPING_INITIALIZER;
struct object *mapping_obj;
int *ett;
struct subobject *mapping_subobj;