diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-15 14:27:14 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-15 14:27:14 -0200 |
commit | a42690b24d828ec4cfae1bf40cac08f07c6202af (patch) | |
tree | 0086370a56c2e48e472c1810d2dfa17d054abdd4 | |
parent | 67a74f540cdbb7ded7aa44c751f5f0c8833c688f (diff) |
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
make distcheck and most gcc 4.3 and sparse warnings.
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | clientwin.c | 6 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | xwininfo.c | 22 |
5 files changed, 27 insertions, 14 deletions
@@ -19,3 +19,6 @@ xwininfo xwininfo.1 *.o *~ +xwininfo-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 854f489..a7fe6dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,7 +46,7 @@ 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/clientwin.c b/clientwin.c index 808adec..cce35ad 100644 --- a/clientwin.c +++ b/clientwin.c @@ -22,6 +22,8 @@ #include <X11/Xatom.h> #include <X11/Xlib.h> +#include "clientwin.h" + static Atom atom_wm_state = None; /* @@ -68,7 +70,7 @@ Window_Is_Viewable(Display * dpy, Window win) * Children are searched in top-down stacking order. * The first matching window is returned, None if no match is found. */ -Window +static Window Find_Client_In_Children(Display * dpy, Window win) { Window root, parent; @@ -114,7 +116,7 @@ Find_Client_In_Children(Display * dpy, Window win) /* * Find virtual roots (_NET_VIRTUAL_ROOTS) */ -unsigned long * +static unsigned long * Find_Roots(Display * dpy, Window root, unsigned int *num) { Atom type_ret; diff --git a/configure.ac b/configure.ac index 5cef3bc..a524275 100644 --- a/configure.ac +++ b/configure.ac @@ -26,19 +26,27 @@ AC_INIT(xwininfo,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xo 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) AC_PROG_CC AC_PROG_INSTALL +XORG_CWARNFLAGS + AC_CHECK_FUNCS([strlcat]) # Checks for pkg-config packages PKG_CHECK_MODULES(XWININFO, xext x11) +XWININFO_CFLAGS="$CWARNFLAGS $XWININFO_CFLAGS" AC_SUBST(XWININFO_CFLAGS) AC_SUBST(XWININFO_LIBS) XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) @@ -528,19 +528,19 @@ Display_Window_Id(Window window, Bool newline_wanted) static const binding _window_classes[] = { { InputOutput, "InputOutput" }, { InputOnly, "InputOnly" }, - { 0, 0 } }; + { 0, NULL } }; static const binding _map_states[] = { { IsUnmapped, "IsUnMapped" }, { IsUnviewable, "IsUnviewable" }, { IsViewable, "IsViewable" }, - { 0, 0 } }; + { 0, NULL } }; static const binding _backing_store_states[] = { { NotUseful, "NotUseful" }, { WhenMapped, "WhenMapped" }, { Always, "Always" }, - { 0, 0 } }; + { 0, NULL } }; static const binding _bit_gravity_states[] = { { ForgetGravity, "ForgetGravity" }, @@ -554,7 +554,7 @@ static const binding _bit_gravity_states[] = { { SouthGravity, "SouthGravity" }, { SouthEastGravity, "SouthEastGravity" }, { StaticGravity, "StaticGravity" }, - { 0, 0 }}; + { 0, NULL }}; static const binding _window_gravity_states[] = { { UnmapGravity, "UnmapGravity" }, @@ -568,7 +568,7 @@ static const binding _window_gravity_states[] = { { SouthGravity, "SouthGravity" }, { SouthEastGravity, "SouthEastGravity" }, { StaticGravity, "StaticGravity" }, - { 0, 0 }}; + { 0, NULL }}; static const binding _visual_classes[] = { { StaticGray, "StaticGray" }, @@ -577,7 +577,7 @@ static const binding _visual_classes[] = { { PseudoColor, "PseudoColor" }, { TrueColor, "TrueColor" }, { DirectColor, "DirectColor" }, - { 0, 0 }}; + { 0, NULL }}; static void Display_Stats_Info(Window window) @@ -759,18 +759,18 @@ static const binding _gravities[] = { { SouthGravity, "SouthGravity" }, { SouthEastGravity, "SouthEastGravity" }, { StaticGravity, "StaticGravity" }, - { 0, 0 } }; + { 0, NULL } }; static const binding _backing_store_hint[] = { { NotUseful, "NotUseful" }, { WhenMapped, "WhenMapped" }, { Always, "Always" }, - { 0, 0 } }; + { 0, NULL } }; static const binding _bool[] = { { 0, "No" }, { 1, "Yes" }, - { 0, 0 } }; + { 0, NULL } }; static void Display_Bits_Info(Window window) @@ -824,7 +824,7 @@ static const binding _event_mask_names[] = { { PropertyChangeMask, "PropertyChange" }, { ColormapChangeMask, "ColormapChange" }, { OwnerGrabButtonMask, "OwnerGrabButton" }, - { 0, 0 } }; + { 0, NULL } }; static void Display_Event_Mask(long mask) @@ -1093,7 +1093,7 @@ static const binding _state_hints[] = { { ZoomState, "Zoomed State" }, { IconicState, "Iconic State" }, { InactiveState, "Inactive State" }, - { 0, 0 } }; + { 0, NULL } }; static void Display_WM_Info(Window window) |