Fix warning in gdb.base/signals-state-child.c
authorYao Qi <yao.qi@linaro.org>
Fri, 12 Aug 2016 10:02:04 +0000 (11:02 +0100)
committerYao Qi <yao.qi@linaro.org>
Fri, 12 Aug 2016 10:02:04 +0000 (11:02 +0100)
I see the following warning when running signals-state-child.exp.

gdb/testsuite/gdb.base/signals-state-child.c:77:4: warning: too many arguments for format [-Wformat-extra-args]
    fprintf (out, "sigaction={sa_handler=", i);
    ^

this patch is to remove the argument from fprintf.

gdb/testsuite:

2016-08-12  Yao Qi  <yao.qi@linaro.org>

* gdb.base/signals-state-child.c (main): Remove "i" from fprintf's
argument list.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/signals-state-child.c

index bfd1748fbff61962b1746b83b4bf83374e0d44f9..d7437aad56f5254a2537306ac03bd0a89b81428f 100644 (file)
@@ -1,3 +1,8 @@
+2016-08-12  Yao Qi  <yao.qi@linaro.org>
+
+       * gdb.base/signals-state-child.c (main): Remove "i" from fprintf's
+       argument list.
+
 2016-08-10  Pedro Alves  <palves@redhat.com>
 
        PR gdb/19187
index e11fa931fd7c9ed5dea38eb4d938f3cc17be6652..f934c86159ffd34d4654b0f4aea8b19a70dac24c 100644 (file)
@@ -74,7 +74,7 @@ main (int argc, char **argv)
        {
          int m;
 
-         fprintf (out, "sigaction={sa_handler=", i);
+         fprintf (out, "sigaction={sa_handler=");
 
          if (oldact.sa_handler == SIG_DFL)
            fprintf (out, "SIG_DFL");