These 2 top-level declarations had a non-constant initializer. Fix that by moving thme into a function. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- validation/nocast.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/validation/nocast.c b/validation/nocast.c index 6c5da968776b..cabcff622676 100644 --- a/validation/nocast.c +++ b/validation/nocast.c @@ -26,9 +26,11 @@ static ulong_nc_t good_deref(ulong_nc_t *t) /* assign value */ static ulong_nc_t t; -static ulong_nc_t good_assign_self = t; -static unsigned long good_assign_sametype = t; - +static void assign_value(void) +{ + ulong_nc_t good_assign_self = t; + unsigned long good_assign_sametype = t; +} /* assign pointer */ static ulong_nc_t *good_ptr = &t; static ulong_nc_t *bad_ptr_to = 1UL; -- 2.24.0