Prepare to enable compiling the code with paranoid compiler settings.
SVN revision: 9405
This commit is contained in:
parent
a291eb53b4
commit
1e9bac844d
16
acinclude.m4
16
acinclude.m4
|
@ -7,7 +7,7 @@
|
|||
dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_ESD,
|
||||
AC_DEFUN([AM_PATH_ESD],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the esd-config script
|
||||
dnl
|
||||
|
@ -162,4 +162,18 @@ int main ()
|
|||
AC_SUBST(ESD_LIBS)
|
||||
rm -f conf.esdtest
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_C___ATTRIBUTE__],
|
||||
[
|
||||
AC_MSG_CHECKING(for __attribute__)
|
||||
AC_CACHE_VAL(ac_cv___attribute__, [
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
[int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }],
|
||||
ac_cv___attribute__=yes, ac_cv___attribute__=no)])
|
||||
if test "$ac_cv___attribute__" = "yes"; then
|
||||
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__])
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv___attribute__)
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
|
||||
|
|
10
configure.in
10
configure.in
|
@ -53,6 +53,7 @@ AC_CHECK_HEADERS(alloca.h stdarg.h wctype.h)
|
|||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
AC_C___ATTRIBUTE__
|
||||
|
||||
AC_CHECK_FUNCS(getcwd)
|
||||
AC_CHECK_FUNCS(mkdir)
|
||||
|
@ -187,7 +188,7 @@ fi
|
|||
AC_SUBST(XVM_LIBS)
|
||||
|
||||
AC_ARG_ENABLE(xrandr,
|
||||
[ --enable-xrandr compile with RandR support [default=no]], ,enable_xrandr=no)
|
||||
[ --enable-xrandr compile with RandR support [default=no]], ,enable_xrandr=no)
|
||||
if test "x$enable_xrandr" = "xyes"; then
|
||||
AC_CHECK_LIB(Xrandr, XRRQueryExtension,
|
||||
AC_DEFINE(HAS_XRANDR, 1, [RandR support]) XRANDR_LIBS=-lXrandr, ,$X_LIBS)
|
||||
|
@ -203,6 +204,13 @@ echo "Warning: No ales were found in your refrigerator."
|
|||
echo " We highly suggest that you rectify this situation immediately."
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(gcc-warnings,
|
||||
[ --enable-gcc-warnings enable GCC compiler warnings [default=no]], ,
|
||||
enable_gcc_warnings=no)
|
||||
if test "x$enable_gcc_warnings" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -W -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Waggregate-return -Wcast-align -Wpointer-arith #-Wshadow -Wwrite-strings -Wunreachable-code"
|
||||
fi
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
|
|
|
@ -164,6 +164,12 @@ extern Drawable vIcDrw;
|
|||
#include <Fnlib.h>
|
||||
#endif
|
||||
|
||||
#if HAVE___ATTRIBUTE__
|
||||
#define __UNUSED__ __attribute__((unused))
|
||||
#else
|
||||
#define __UNUSED__
|
||||
#endif
|
||||
|
||||
#define FILEPATH_LEN_MAX 4096
|
||||
|
||||
#define DEFAULT_LINKCOLOR_R 30
|
||||
|
|
|
@ -45,7 +45,7 @@ ImlibSetFgColorFromGC(Display * disp, GC gc, Colormap cm)
|
|||
|
||||
void
|
||||
EFont_draw_string(Display * disp, Drawable win, GC gc, int x, int y, char *text,
|
||||
Efont * f, Visual * vis, Colormap cm)
|
||||
Efont * f, Visual * vis __UNUSED__, Colormap cm)
|
||||
{
|
||||
Imlib_Image im;
|
||||
int w, h, ascent, descent;
|
||||
|
@ -98,7 +98,7 @@ void
|
|||
Efont_extents(Efont * f, char *text, int *font_ascent_return,
|
||||
int *font_descent_return, int *width_return,
|
||||
int *max_ascent_return, int *max_descent_return,
|
||||
int *lbearing_return, int *rbearing_return)
|
||||
int *lbearing_return __UNUSED__, int *rbearing_return __UNUSED__)
|
||||
{
|
||||
int height;
|
||||
|
||||
|
|
6
src/E.h
6
src/E.h
|
@ -191,6 +191,12 @@ if (__xim) XDestroyImage(__xim);}
|
|||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if HAVE___ATTRIBUTE__
|
||||
#define __UNUSED__ __attribute__((unused))
|
||||
#else
|
||||
#define __UNUSED__
|
||||
#endif
|
||||
|
||||
/* workaround for 64bit architectures - xlib expects 32bit CARDINALS to be */
|
||||
/* long's on 64bit machines... thus well the CARD32's Im unsing shoudl be.. */
|
||||
#define CARD32 long
|
||||
|
|
|
@ -178,8 +178,8 @@ EwinListRaise(EWinList * ewl, EWin * ewin, int mode)
|
|||
/*
|
||||
* The global stacking and focus lists
|
||||
*/
|
||||
EWinList EwinListFocus = { "Focus" };
|
||||
EWinList EwinListStack = { "Stack" };
|
||||
EWinList EwinListFocus = { "Focus", 0, 0, NULL };
|
||||
EWinList EwinListStack = { "Stack", 0, 0, NULL };
|
||||
|
||||
EWin **
|
||||
EwinListGetStacking(int *num)
|
||||
|
|
Loading…
Reference in New Issue