xserver/os
Adam Jackson aabf65d2a0 os: Fix warning in LockServer
The meson build gives me:

../os/utils.c: In function ‘LockServer’:
../os/utils.c:310:40: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
     snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid());
                                        ^~~~~~~~~
../os/utils.c:310:5: note: ‘snprintf’ output between 12 and 13 bytes into a destination of size 12
     snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid());
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Which seems to be due to the %d part meaning that a negative number's -
sign would be one wider than we're expecting. Fine, just coerce it to
unsigned.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-08-30 15:53:04 -04:00
..
.gitignore
Makefile.am
WaitFor.c
access.c
auth.c
backtrace.c
busfault.c
client.c
connection.c
inputthread.c
io.c
log.c
meson.build
mitauth.c
oscolor.c
osdep.h
osinit.c
ospoll.c
ospoll.h
reallocarray.c
rpcauth.c
strcasecmp.c
strcasestr.c
strlcat.c
strlcpy.c
strndup.c
timingsafe_memcmp.c
utils.c os: Fix warning in LockServer 2017-08-30 15:53:04 -04:00
xdmauth.c
xdmcp.c
xprintf.c
xserver_poll.c
xsha1.c
xstrans.c