aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-epl.h
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.h
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.h')
-rw-r--r--epan/dissectors/packet-epl.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/epan/dissectors/packet-epl.h b/epan/dissectors/packet-epl.h
index 7db6187fa7..42428e175b 100644
--- a/epan/dissectors/packet-epl.h
+++ b/epan/dissectors/packet-epl.h
@@ -30,11 +30,6 @@
#include <epan/wmem/wmem.h>
#include <epan/range.h>
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
-#pragma GCC diagnostic ignored "-Wmissing-braces"
-#endif
-
struct epl_datatype;
struct profile {
@@ -76,6 +71,7 @@ struct od_entry {
const struct epl_datatype *type;
guint64 value;
};
+#define OD_ENTRY_INITIALIZER { 0, 0, { 0 }, 0, 0 }
struct subobject {
range_admin_t range;
@@ -121,7 +117,7 @@ range_admin_t * epl_wmem_iarray_find(epl_wmem_iarray_t *arr, guint32 value);
gboolean epl_wmem_iarray_is_empty(epl_wmem_iarray_t *iarr);
gboolean epl_wmem_iarray_is_sorted(epl_wmem_iarray_t *iarr);
-#define EPL_OBJECT_MAPPING_SIZE sizeof (guint64)
+#define EPL_OBJECT_MAPPING_SIZE ((guint)sizeof (guint64))
#define CHECK_OVERLAP_ENDS(x1, x2, y1, y2) ((x1) < (y2) && (y1) < (x2))
#define CHECK_OVERLAP_LENGTH(x, x_len, y, y_len) \