diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-30 16:38:03 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-30 16:38:03 -0200 |
commit | bf284b043d4c5688da2207647126b095f8c2b0cd (patch) | |
tree | fd46a96bc9f5143470adb96dd185ecee327934bf | |
parent | a0c45b798d2fa810167d64a92093840178f993b1 (diff) |
Janitor: make distcheck, compiler warnings, .gitignore
Warning corrections are either unused symbols or using an
integer as a pointer (generated by sparse).
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | man/.gitignore | 3 | ||||
-rw-r--r-- | src/.gitignore | 7 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/Xrandr.c | 2 | ||||
-rw-r--r-- | src/XrrConfig.c | 2 | ||||
-rw-r--r-- | src/XrrCrtc.c | 12 | ||||
-rw-r--r-- | src/XrrMode.c | 1 | ||||
-rw-r--r-- | src/XrrOutput.c | 6 | ||||
-rw-r--r-- | src/XrrProperty.c | 16 | ||||
-rw-r--r-- | src/XrrScreen.c | 2 |
13 files changed, 31 insertions, 54 deletions
@@ -1,3 +1,5 @@ +.deps +.libs aclocal.m4 autom4te.cache compile @@ -19,3 +21,10 @@ mkinstalldirs stamp-h1 xrandr.pc *~ +*.3 +*.o +*.la +*.lo +libXrandr-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index bef1d41..9dc4b53 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,19 +21,15 @@ SUBDIRS = src man -AM_CFLAGS = $(RANDR_CFLAGS) $(X_CFLAGS) - pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xrandr.pc -EXTRA_DIST = xrandr.pc.in autogen.sh - -EXTRA_DIST += ChangeLog +EXTRA_DIST = xrandr.pc.in 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 d086cde..a8a4bfa 100644 --- a/configure.ac +++ b/configure.ac @@ -35,29 +35,30 @@ AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE +# 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_CONFIG_HEADER(config.h) # Check for progs AC_PROG_CC AC_PROG_LIBTOOL - -# Check for X -PKG_CHECK_MODULES(X, x11) -AC_SUBST(X_CFLAGS) -AC_SUBST(X_LIBS) +XORG_CWARNFLAGS # Check randr configuration, strip extra digits from package version to # find the required protocol version RANDR_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`] AC_SUBST(RANDR_VERSION) -PKG_CHECK_MODULES(RANDR, randrproto >= $RANDR_VERSION xext xextproto xrender renderproto) +PKG_CHECK_MODULES(RANDR, x11 randrproto >= $RANDR_VERSION xext xextproto xrender renderproto) +RANDR_CFLAGS="$CWARNFLAGS $RANDR_CFLAGS" AC_SUBST(RANDR_CFLAGS) AC_SUBST(RANDR_LIBS) XORG_CHECK_MALLOC_ZERO XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 2d0f344..0000000 --- a/man/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -*.3* diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 00409a0..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.deps -.libs -libXrandr.la -*.lo -*.o -Makefile -Makefile.in diff --git a/src/Makefile.am b/src/Makefile.am index 57aa59c..ab7e778 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,8 +10,8 @@ libXrandr_la_SOURCES = \ XrrProperty.c \ XrrScreen.c -libXrandr_la_LIBADD = @X_LIBS@ @RANDR_LIBS@ -AM_CFLAGS = @X_CFLAGS@ @RANDR_CFLAGS@ @MALLOC_ZERO_CFLAGS@ +libXrandr_la_LIBADD = @RANDR_LIBS@ +AM_CFLAGS = @RANDR_CFLAGS@ @MALLOC_ZERO_CFLAGS@ INCLUDES = -I$(top_srcdir)/include/X11/extensions diff --git a/src/Xrandr.c b/src/Xrandr.c index c923e0f..8ab1eae 100644 --- a/src/Xrandr.c +++ b/src/Xrandr.c @@ -232,7 +232,7 @@ XRRFindDisplay (Display *dpy) dpyinfo = XextAddDisplay (&XRRExtensionInfo, dpy, XRRExtensionName, &rr_extension_hooks, - RRNumberEvents, 0); + RRNumberEvents, NULL); numscreens = ScreenCount(dpy); xrri = Xmalloc (sizeof(XRandRInfo) + sizeof(char *) * numscreens); diff --git a/src/XrrConfig.c b/src/XrrConfig.c index 7784227..db7a1ae 100644 --- a/src/XrrConfig.c +++ b/src/XrrConfig.c @@ -69,7 +69,7 @@ short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates) if (!nents) { *nrates = 0; - return 0; + return NULL; } *nrates = (int) *r; return r + 1; diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c index 91b1671..db9d0b4 100644 --- a/src/XrrCrtc.c +++ b/src/XrrCrtc.c @@ -39,10 +39,9 @@ XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc) xRRGetCrtcInfoReply rep; xRRGetCrtcInfoReq *req; int nbytes, nbytesRead, rbytes; - int i; XRRCrtcInfo *xci; - RRCheckExtension (dpy, info, 0); + RRCheckExtension (dpy, info, NULL); LockDisplay (dpy); GetReq (RRGetCrtcInfo, req); @@ -128,7 +127,6 @@ XRRSetCrtcConfig (Display *dpy, XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRSetCrtcConfigReply rep; xRRSetCrtcConfigReq *req; - int i; RRCheckExtension (dpy, info, 0); @@ -159,7 +157,6 @@ XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc) XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRGetCrtcGammaSizeReply rep; xRRGetCrtcGammaSizeReq *req; - int i; RRCheckExtension (dpy, info, 0); @@ -182,12 +179,11 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc) XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRGetCrtcGammaReply rep; xRRGetCrtcGammaReq *req; - int i; XRRCrtcGamma *crtc_gamma; long nbytes; long nbytesRead; - RRCheckExtension (dpy, info, 0); + RRCheckExtension (dpy, info, NULL); LockDisplay(dpy); GetReq (RRGetCrtcGamma, req); @@ -358,7 +354,6 @@ XRRGetCrtcTransform (Display *dpy, XRRCrtcTransformAttributes **attributes) { XExtDisplayInfo *info = XRRFindDisplay(dpy); - XRandRInfo *xrri; xRRGetCrtcTransformReply rep; xRRGetCrtcTransformReq *req; int major_version, minor_version; @@ -472,7 +467,7 @@ XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc) xRRGetPanningReq *req; XRRPanning *xp; - RRCheckExtension (dpy, info, 0); + RRCheckExtension (dpy, info, NULL); LockDisplay (dpy); GetReq (RRGetPanning, req); @@ -528,7 +523,6 @@ XRRSetPanning (Display *dpy, XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRSetPanningReply rep; xRRSetPanningReq *req; - int i; RRCheckExtension (dpy, info, 0); diff --git a/src/XrrMode.c b/src/XrrMode.c index fce3037..58ef68b 100644 --- a/src/XrrMode.c +++ b/src/XrrMode.c @@ -54,7 +54,6 @@ XRRCreateMode (Display *dpy, Window window, XRRModeInfo *mode_info) XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRCreateModeReq *req; xRRCreateModeReply rep; - long channelSize; RRCheckExtension (dpy, info, None); diff --git a/src/XrrOutput.c b/src/XrrOutput.c index 9545cbe..0c39a31 100644 --- a/src/XrrOutput.c +++ b/src/XrrOutput.c @@ -42,11 +42,9 @@ XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output) xRRGetOutputInfoReply rep; xRRGetOutputInfoReq *req; int nbytes, nbytesRead, rbytes; - int i; - xRRQueryVersionReq *vreq; XRROutputInfo *xoi; - RRCheckExtension (dpy, info, 0); + RRCheckExtension (dpy, info, NULL); LockDisplay (dpy); GetReq (RRGetOutputInfo, req); @@ -142,7 +140,6 @@ XRRSetOutputPrimary(Display *dpy, Window window, RROutput output) { XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRSetOutputPrimaryReq *req; - int i; int major_version, minor_version; RRSimpleCheckExtension (dpy, info); @@ -168,7 +165,6 @@ XRRGetOutputPrimary(Display *dpy, Window window) XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRGetOutputPrimaryReq *req; xRRGetOutputPrimaryReply rep; - int i; int major_version, minor_version; RRCheckExtension (dpy, info, 0); diff --git a/src/XrrProperty.c b/src/XrrProperty.c index d3d3246..9554f9a 100644 --- a/src/XrrProperty.c +++ b/src/XrrProperty.c @@ -38,12 +38,10 @@ XRRListOutputProperties (Display *dpy, RROutput output, int *nprop) XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRListOutputPropertiesReply rep; xRRListOutputPropertiesReq *req; - int nbytes, nbytesRead, rbytes; - int i; - xRRQueryVersionReq *vreq; + int nbytes, rbytes; Atom *props = NULL; - RRCheckExtension (dpy, info, 0); + RRCheckExtension (dpy, info, NULL); LockDisplay (dpy); GetReq (RRListOutputProperties, req); @@ -87,11 +85,9 @@ XRRQueryOutputProperty (Display *dpy, RROutput output, Atom property) xRRQueryOutputPropertyReply rep; xRRQueryOutputPropertyReq *req; int rbytes, nbytes; - int i; - xRRQueryVersionReq *vreq; XRRPropertyInfo *prop_info; - RRCheckExtension (dpy, info, 0); + RRCheckExtension (dpy, info, NULL); LockDisplay (dpy); GetReq (RRQueryOutputProperty, req); @@ -140,7 +136,6 @@ XRRConfigureOutputProperty (Display *dpy, RROutput output, Atom property, { XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRConfigureOutputPropertyReq *req; - xRRQueryVersionReq *vreq; long len; RRSimpleCheckExtension (dpy, info); @@ -173,7 +168,6 @@ XRRChangeOutputProperty (Display *dpy, RROutput output, { XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRChangeOutputPropertyReq *req; - xRRQueryVersionReq *vreq; long len; RRSimpleCheckExtension (dpy, info); @@ -258,9 +252,7 @@ XRRGetOutputProperty (Display *dpy, RROutput output, XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRGetOutputPropertyReply rep; xRRGetOutputPropertyReq *req; - long nbytes, rbytes, nbytesRead; - int i; - xRRQueryVersionReq *vreq; + long nbytes, rbytes; RRCheckExtension (dpy, info, 1); diff --git a/src/XrrScreen.c b/src/XrrScreen.c index df49bb5..54bc2ca 100644 --- a/src/XrrScreen.c +++ b/src/XrrScreen.c @@ -53,7 +53,7 @@ doGetScreenResources (Display *dpy, Window window, int poll) Bool getting_version = False; XRandRInfo *xrri; - RRCheckExtension (dpy, info, 0); + RRCheckExtension (dpy, info, NULL); LockDisplay (dpy); xrri = (XRandRInfo *) info->data; |