[systemd-devel] Compile errors with -Og
Jan Janssen
medhefgo at web.de
Wed Jun 12 04:02:53 PDT 2013
Hi,
I just tried compiling with -Og and I get these compiler errors.
Those don't appear with any other optimization level, so I'm
suspecting a compiler but here. But since I'm no C expert, I thought
it would be best if I share this here to see if I'm right about this
or whether this just shows some subtle bug in the code.
This is on a up-to-date arch box (gcc 4.8.1) and "make clean"
run before trying to compile.
Jan
---
CC src/shared/util.lo
src/shared/util.c: In function 'safe_atod':
src/shared/util.c:383:16: warning: 'd' may be used uninitialized in this
function [-Wmaybe-uninitialized]
*ret_d = (double) d;
^
In file included from /usr/include/fcntl.h:296:0,
from src/shared/util.c:35:
In function 'open',
inlined from 'open_terminal' at src/shared/util.c:1834:20:
/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode'
declared with attribute error: open with O_CREAT in second argument
needs 3 arguments
__open_missing_mode ();
^
In file included from /usr/include/fcntl.h:296:0,
from src/shared/util.c:35:
In function 'openat',
inlined from 'xopendirat' at src/shared/util.c:3478:13:
/usr/include/bits/fcntl2.h:126:26: error: call to
'__openat_missing_mode' declared with attribute error: openat with
O_CREAT in third argument needs 4 arguments
__openat_missing_mode ();
^
src/shared/util.c: In function 'create_tmp_dir':
src/shared/util.c:5718:12: warning: 'd' may be used uninitialized in
this function [-Wmaybe-uninitialized]
dt = strjoin(d, "/tmp", NULL);
^
make[2]: *** [src/shared/util.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
More information about the systemd-devel
mailing list