[LTP] [PATCH] tst_test: Propagate SIGINT to test process

Jan Stancek jstancek@redhat.com
Tue Aug 16 13:50:55 CEST 2016





----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Tuesday, 16 August, 2016 1:34:51 PM
> Subject: Re: [PATCH] tst_test: Propagate SIGINT to test process
> 
> Hi!
> > This still gives me a warning:
> >   tst_test.c: In function ???sigint_handler???:
> >   tst_test.c:732:3: warning: ignoring return value of ???write???, declared
> >   with attribute warn_unused_result [-Wunused-result]
> >    (void)write(2, SIGINT_MSG, sizeof(SIGINT_MSG) - 1);
> >    ^
> > We could use fprintf(stderr):
> >   fprintf(stderr, "%s\n", SIGINT_MSG);
> 
> Ping.
> 
> What do you think about this?
> 
> Should we ignore the warning for the time being or add the dummy if ()
> to silence it?

I'd go with dummy if (). I think we should try to keep warnings down,
at least for lib. I always check compilation output, and one less
warning to go through each time is IMO worth making this simple workaround.

Regards,
Jan

> 
> --
> Cyril Hrubis
> chrubis@suse.cz
> 


More information about the ltp mailing list