]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't cast an initializer to the struct type in power_insn_available.c.
authorMark Wielaard <mark@klomp.org>
Thu, 18 Jan 2018 10:28:11 +0000 (11:28 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 18 Jan 2018 10:28:11 +0000 (11:28 +0100)
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).

tests/power_insn_available.c

index bcd079885a8351cdd07f0232040bd45bdc075f8e..3f9984df8dd77bf81bd6e2476e722fe1921e8315 100644 (file)
@@ -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,
 };