httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53690] Calls to semctl() trigger "uninitialized memory" warning from valgrind
Date Fri, 10 Aug 2012 02:16:20 GMT

--- Comment #2 from Mikhail T. <> ---
(In reply to comment #1)
> unixd.c: In function ‘ap_unixd_set_proc_mutex_perms’:
> unixd.c:244:20: warning: missing braces around initializer [-Wmissing-braces]

Yeah, the first field of the semid_ds-structure is also a structure (at least
on Linux and FreeBSD), so using two layers of braces should work:

     struct semid_ds buf = {{ 0 }};

If that's not portable enough, then bzero() might be in order:

     bzero(&buf, sizeof(buf));

however annoying it might be to have a function-call (even if compiler will
optimize it away) just to zero-out an automatic variable :-(

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message