
bugzilla at apache
Aug 9, 2012, 7:16 PM
Post #2 of 2
(60 views)
Permalink
|
|
[Bug 53690] Calls to semctl() trigger "uninitialized memory" warning from valgrind
[In reply to]
|
|
https://issues.apache.org/bugzilla/show_bug.cgi?id=53690 --- Comment #2 from Mikhail T. <mi+apache [at] aldan> --- (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: bugs-unsubscribe [at] httpd For additional commands, e-mail: bugs-help [at] httpd
|