From: Eric Blake Date: Fri, 8 Jul 2011 21:55:40 +0000 (-0600) Subject: test-sigprocmask: avoid compiler warning X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b80db060001e52a487a0502a6258156cbeea2a8a;p=pspp test-sigprocmask: avoid compiler warning * modules/sigprocmask-tests (Depends-on): Add ignore-value. * tests/test-sigprocmask.c (main): Use it to silence warning. Reported by Jim Meyering. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 2465f4c04d..ade65398de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-07-08 Eric Blake + test-sigprocmask: avoid compiler warning + * modules/sigprocmask-tests (Depends-on): Add ignore-value. + * tests/test-sigprocmask.c (main): Use it to silence warning. + Reported by Jim Meyering. + test-snprintf: avoid compiler warning * tests/test-snprintf.c (main): Avoid shadowed declaration. * tests/test-vsnprintf.c (main): Likewise. diff --git a/modules/sigprocmask-tests b/modules/sigprocmask-tests index 80fcd81fea..f6c0410bea 100644 --- a/modules/sigprocmask-tests +++ b/modules/sigprocmask-tests @@ -4,6 +4,7 @@ tests/signature.h tests/macros.h Depends-on: +ignore-value sleep configure.ac: diff --git a/tests/test-sigprocmask.c b/tests/test-sigprocmask.c index 628c1aba7f..973c5d88e1 100644 --- a/tests/test-sigprocmask.c +++ b/tests/test-sigprocmask.c @@ -28,6 +28,7 @@ SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *)); #include #include +#include "ignore-value.h" #include "macros.h" #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) @@ -61,7 +62,7 @@ main (int argc, char *argv[]) /* Request a SIGINT signal from outside. */ sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid); - system (command); + ignore_value (system (command)); /* Wait. */ sleep (2);