From: Mark Wielaard Date: Thu, 18 Jan 2018 10:28:11 +0000 (+0100) Subject: Don't cast an initializer to the struct type in power_insn_available.c. X-Git-Tag: VALGRIND_3_14_0~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a705cfa900b18c206723bf1218dff44aaef3975;p=thirdparty%2Fvalgrind.git Don't cast an initializer to the struct type in power_insn_available.c. In C99 mode casting the initializer to the struct type will cause gcc to report an error like: power_insn_available.c:38:1: error: initializer element is not constant Simply removing the unnecessary cast fixes this (and is also valid C90). --- diff --git a/tests/power_insn_available.c b/tests/power_insn_available.c index bcd079885a..3f9984df8d 100644 --- a/tests/power_insn_available.c +++ b/tests/power_insn_available.c @@ -33,7 +33,7 @@ static void unsup_insn_handler(int signal_number) longjmp(unsup_insn_env, 1); return; } -static struct sigaction unsup_insn_action = (struct sigaction) { +static struct sigaction unsup_insn_action = { .sa_handler = &unsup_insn_handler, };