Avoid superfluous compiler warnings
GCC warns about uninitialized local variables in cases where no initialization is needed, in particular in the overloads of the 'Capability::call()' function. Prior this patch, we dealt with those warnings by using an (unreliable) GCC pragma or by disabling the particular warning altogether (which is a bad idea). This patch removes the superfluous warnings by telling the compiler that the variable in question is volatile.
This commit is contained in:
@@ -2,18 +2,3 @@ TARGET = chroot
|
||||
REQUIRES = linux
|
||||
SRC_CC = main.cc
|
||||
LIBS = cxx env server lx_hybrid
|
||||
|
||||
#
|
||||
# XXX find a way to remove superfluous warning:
|
||||
#
|
||||
# base/include/util/token.h: In constructor ‘Genode::Config::Config()’:
|
||||
# base/include/util/token.h:69:67: warning: ‘ret’ may be used uninitialized in
|
||||
# this function [-Wuninitialized]
|
||||
# base/include/base/capability.h:196:62: note: ‘ret’ was declared here
|
||||
# base/include/util/token.h:100:68: warning: ‘prephitmp.1897’ may be used
|
||||
# uninitialized in this function
|
||||
# [-Wuninitialized]
|
||||
# os/include/os/config.h:42:4: note: ‘prephitmp.1897’ was declared here
|
||||
#
|
||||
CC_WARN = -Wall -Wno-uninitialized
|
||||
|
||||
|
||||
Reference in New Issue
Block a user