|
From: <sv...@va...> - 2008-10-23 09:53:03
|
Author: sewardj
Date: 2008-10-23 10:46:59 +0100 (Thu, 23 Oct 2008)
New Revision: 8697
Log:
gcc-4.4.0 (snapshot) started complaining about buf.sem_nsems being
uninitialised in get_sem_count(). This makes it quiet. I am not sure
whether get_sem_count() was correct or not without it (probably was
OK).
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2008-10-22 15:49:59 UTC (rev 8696)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2008-10-23 09:46:59 UTC (rev 8697)
@@ -1580,6 +1580,11 @@
union vki_semun arg;
SysRes res;
+ /* Doesn't actually seem to be necessary, but gcc-4.4.0 20081017
+ (experimental) otherwise complains that the use in the return
+ statement below is uninitialised. */
+ buf.sem_nsems = 0;
+
arg.buf = &buf;
# ifdef __NR_semctl
@@ -1587,7 +1592,7 @@
# else
res = VG_(do_syscall5)(__NR_ipc, 3 /* IPCOP_semctl */, semid, 0,
VKI_IPC_STAT, (UWord)&arg);
-# endif
+# endif
if (res.isError)
return 0;
|