Always compile with Extra warnings.

This commit is contained in:
Dave Davenport 2015-02-01 15:12:29 +01:00
parent 1156c19cbf
commit 5d4ab2e626
3 changed files with 7 additions and 5 deletions

View file

@ -11,6 +11,7 @@ LIBS=\
@pango_LIBS@ @pango_LIBS@
AM_CFLAGS=\ AM_CFLAGS=\
@EXTRA_CFLAGS@\
@xft_CFLAGS@\ @xft_CFLAGS@\
@x11_CFLAGS@\ @x11_CFLAGS@\
@xinerama_CFLAGS@\ @xinerama_CFLAGS@\

View file

@ -52,6 +52,7 @@ PKG_CHECK_MODULES([x11], [x11])
PKG_CHECK_MODULES([xinerama], [xinerama]) PKG_CHECK_MODULES([xinerama], [xinerama])
PKG_CHECK_MODULES([pango], [pango pangoxft]) PKG_CHECK_MODULES([pango], [pango pangoxft])
AC_SUBST([EXTRA_CFLAGS], ["-Wall -Wextra"])
AC_CONFIG_FILES([Makefile ]) AC_CONFIG_FILES([Makefile ])
AC_OUTPUT AC_OUTPUT

View file

@ -2750,7 +2750,10 @@ static void create_pid_file ( const char *pidfile )
// Write pid, not needed, but for completeness sake. // Write pid, not needed, but for completeness sake.
char buffer[64]; char buffer[64];
int length = snprintf ( buffer, 64, "%i", getpid () ); int length = snprintf ( buffer, 64, "%i", getpid () );
ssize_t l = write ( fd, buffer, length ); ssize_t l = 0;
while ( l < length ) {
l += write ( fd, &buffer[l], length - l );
}
} }
} }
@ -2918,10 +2921,7 @@ int main ( int argc, char *argv[] )
// Setup handler for sighub (reload config) // Setup handler for sighub (reload config)
const struct sigaction hup_action = { const struct sigaction hup_action = {
.sa_handler = hup_action_handler, .sa_handler = hup_action_handler
.sa_mask = 0,
.sa_flags = 0,
.sa_restorer = NULL
}; };
sigaction ( SIGHUP, &hup_action, NULL ); sigaction ( SIGHUP, &hup_action, NULL );