I am starting to believe that, maybe -Wpointer-arith should not only be out of $CWARNFLAGS, but that $CWARNFLAGS should actually include -Wno-pointer-arith. Almost every "casting" is a sign of something going wrong, as the compiler should always able to do proper type conversion automatically, and changing the void *'s in the ati driver to something like an "unsigned char *" just to correct that warning may not be the proper solution.
A "Janitor: Fix compiler warnings" should also be done, to add declarations to headers, and move prototypes in C files to H ones (I started doing that, but I also done a wrong "git reset --hard" and lost it, maybe next time :-)...
>From 5867bb7e801c8248fda4a603c20a5ba8f3b2141c Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade <[email protected]> Date: Thu, 5 Feb 2009 20:47:17 -0200 Subject: [PATCH] Janitor: make distcheck, .gitignore. Use `` instead of $(). Use $PKG_CONFIG to honor user build setup. Use XORG_CHANGELOG and XORG_CWARNFLAGS macros, for automatic ChangeLog file generation and more verbose compiler warnings. Signed-off-by: Paulo Cesar Pereira de Andrade <[email protected]> --- .gitignore | 5 +++++ Makefile.am | 4 ++-- configure.ac | 19 +++++++------------ src/Makefile.am | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index ddc5574..c9e2bca 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,8 @@ radeon.4 radeon.4x stamp-h1 *cscope* +src/modes +src/parser +xf86-video-ati-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 87e90ba..1817e61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,11 +22,11 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man EXTRA_DIST = ChangeLog -CLEANFILES = ChangeLog +MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 8a6000a..de0d6fe 100644 --- a/configure.ac +++ b/configure.ac @@ -32,16 +32,16 @@ AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([dist-bzip2]) +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_MAINTAINER_MODE # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC - -if test "x$GCC" = "xyes"; then - CPPFLAGS="$CPPFLAGS -Wall" -fi +XORG_CWARNFLAGS AH_TOP([#include "xorg-server.h"]) @@ -50,6 +50,7 @@ AC_ARG_WITH(xorg-module-dir, [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir="$withval"], [moduledir="$libdir/xorg/modules"]) +AC_SUBST([moduledir]) AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri], [Disable DRI support [[default=auto]]]), @@ -76,7 +77,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2 xproto fontsproto $REQUIRED_MODULES]) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` # Checks for libraries. @@ -230,9 +231,6 @@ else fi XMODES_CFLAGS='-DXF86_MODES_RENAME -I$(top_srcdir)/src -I$(top_srcdir)/src/modes -I$(top_srcdir)/src/parser' fi - -AC_SUBST([XMODES_CFLAGS]) - CPPFLAGS="$SAVE_CPPFLAGS" AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes) @@ -308,16 +306,13 @@ case $host_os in AC_DEFINE(FGL_LINUX, 1, [Use linux pragma pack]) ;; esac -AC_SUBST([XORG_CFLAGS]) -AC_SUBST([DRI_CFLAGS]) -AC_SUBST([moduledir]) - DRIVER_NAME=ati AC_SUBST([DRIVER_NAME]) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION XORG_CHECK_LINUXDOC +XORG_CHANGELOG AC_MSG_NOTICE( [The atimisc sub-driver has been split out to xf86-video-mach64:] diff --git a/src/Makefile.am b/src/Makefile.am index c15cc30..c500098 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -69,7 +69,7 @@ if USE_EXA RADEON_EXA_SOURCES = radeon_exa.c endif -AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XMODES_CFLAGS@ -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DDRIVER_PARSER +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) $(DRI_CFLAGS) $(XMODES_CFLAGS) -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS -DATOM_BIOS -DATOM_BIOS_PARSER -DDRIVER_PARSER INCLUDES = -I$(srcdir)/AtomBios/includes -- 1.6.1
_______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
