mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
rt: Initialize mq_send input on tst-mqueue{5,6}
GCC with -Os warns that the mq_send input may be used uninitialized. Although for the tests the data content sent is not important, since both tests checks only if mq_notify was properly set, the warning is correct and data is indeed uninitialized. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
442e3a2172
commit
cbf24edbb3
@ -58,7 +58,7 @@ rtmin_handler (int sig, siginfo_t *info, void *ctx)
|
||||
static int
|
||||
(mqsend) (mqd_t q, int line)
|
||||
{
|
||||
char c;
|
||||
char c = 0;
|
||||
if (mq_send (q, &c, 1, 1) != 0)
|
||||
{
|
||||
printf ("mq_send on line %d failed with: %m\n", line);
|
||||
|
@ -40,7 +40,7 @@
|
||||
static int
|
||||
(mqsend) (mqd_t q, int line)
|
||||
{
|
||||
char c;
|
||||
char c = 0;
|
||||
if (mq_send (q, &c, 1, 1) != 0)
|
||||
{
|
||||
printf ("mq_send on line %d failed with: %m\n", line);
|
||||
|
Loading…
Reference in New Issue
Block a user