diff options
author | Matias Elo <matias.elo@nokia.com> | 2021-10-14 13:45:48 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-10-21 10:53:20 +0300 |
commit | 75c6565ec8f75d690495bf4631cda3da92c02b6a (patch) | |
tree | d7974a7e09dc623bbbf4d29c5189d3ff73d51112 /platform/linux-generic/odp_timer_wheel.c | |
parent | 30ad629ac02a497a1cf6508ea90f4e6dd200b89b (diff) |
linux-gen: fix invalid use of structure with flexible array member errors
Fix "invalid use of structure with flexible array member" errors when
building with 'pedantic' option. Internal queue_num_tbl_t struct was not
used, so it has been removed.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/odp_timer_wheel.c')
-rw-r--r-- | platform/linux-generic/odp_timer_wheel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/linux-generic/odp_timer_wheel.c b/platform/linux-generic/odp_timer_wheel.c index 24ef9cdf7..c50d3a13d 100644 --- a/platform/linux-generic/odp_timer_wheel.c +++ b/platform/linux-generic/odp_timer_wheel.c @@ -94,9 +94,12 @@ typedef union { timer_blk_t *timer_blk_list; } current_timer_slot_t; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpedantic" typedef struct { current_timer_slot_t slots[0]; } current_wheel_t; +#pragma GCC diagnostic pop typedef struct { uint32_t count; @@ -130,9 +133,12 @@ typedef union { /* Each general_timer_slot is 16 bytes long. */ list_entry_t list_entry; } general_timer_slot_t; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpedantic" typedef struct { general_timer_slot_t slots[0]; } general_wheel_t; +#pragma GCC diagnostic pop typedef struct { /* Note that rev stands for revolution - one complete sweep through |