summaryrefslogtreecommitdiff
path: root/include/libunwind-arm.h
diff options
context:
space:
mode:
authorMosè Giordano <mose@gnu.org>2022-02-26 19:22:54 +0000
committerDave Watson <dade.watson@gmail.com>2022-05-22 10:57:52 -0700
commit554ccbea9b61374bd8ab21cc1d9b5e39928b6043 (patch)
tree616b359730b0dda77a1edad252842db3c3d3f81d /include/libunwind-arm.h
parentf67ef2867bc5e74cdadb3acb790c3fc6161b22e9 (diff)
downloadlibunwind-554ccbea9b61374bd8ab21cc1d9b5e39928b6043.tar.gz
Make some structs non-empty
GCC shows warnings like this when compiling libraries or programs linking to libunwind: ``` /buildworker/worker/package_linuxaarch64/build/usr/include/libunwind-aarch64.h:60:9: warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat] typedef struct ^~~~~~ /buildworker/worker/package_linuxaarch64/build/usr/include/libunwind-aarch64.h:169:16: warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat] typedef struct unw_tdep_save_loc ^~~~~~~~~~~~~~~~~ ``` The pattern of using a dummy field is already used in other platforms.
Diffstat (limited to 'include/libunwind-arm.h')
-rw-r--r--include/libunwind-arm.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/libunwind-arm.h b/include/libunwind-arm.h
index 0bea7958..85134b40 100644
--- a/include/libunwind-arm.h
+++ b/include/libunwind-arm.h
@@ -33,11 +33,7 @@ extern "C" {
#include <stddef.h>
#ifndef UNW_EMPTY_STRUCT
-# ifdef __GNUC__
-# define UNW_EMPTY_STRUCT
-# else
-# define UNW_EMPTY_STRUCT uint8_t unused;
-# endif
+# define UNW_EMPTY_STRUCT uint8_t unused;
#endif
#define UNW_TARGET arm