New warnings in utmpx.h + patch
H.J. Lu
hjl@lucon.org
Sat May 15 08:33:00 GMT 1999
>
>
> With make check I received the following warning:
>
> In file included from tst-utmp.c:28,
> from tst-utmpx.c:2:
> ../sysdeps/gnu/utmpx.h:66: warning: `struct utmp' declared inside parameter list
> ../sysdeps/gnu/utmpx.h:66: warning: its scope is only this definition or declara
> tion,
> ../sysdeps/gnu/utmpx.h:66: warning: which is probably not what you want.
> ../sysdeps/gnu/utmpx.h:70: warning: `struct utmp' declared inside parameter list
>
> Since getutmp and getutmpx use struct utmp we should include <utmp.h>
> (Solaris also includes <utmp.h>).
>
> Andreas
>
> 1999-05-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
>
> * sysdeps/gnu/utmpx.h: Include <utmp.h>.
>
I much prefer to use forward declaration, i.e.,
struct utmp;
H.J.
More information about the Libc-hacker
mailing list