diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-26 16:54:58 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-26 16:54:58 -0200 |
commit | b2f32dcacb262014c2b6a87ffecce8026a295c89 (patch) | |
tree | 8db115390f51fe2ba543c0e52fd8df27ebf6af0c | |
parent | a77f4a4743c04139cb5fefa8eb5bf28ed4df6681 (diff) |
Correct make distcheck and sparse warnings.
-rw-r--r-- | .gitignore | 26 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | xrestop.c | 24 |
4 files changed, 46 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..23803d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +.deps +Makefile +Makefile.in +Viewres +aclocal.m4 +autom4te.cache +compile +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +depcomp +install-sh +missing +stamp-h1 +xrestop +xrestop.1 +*~ +*.o +xrestop.spec +xrestop-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 2ef5e75..8693d0d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,6 +16,6 @@ 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 20703d4..fc1bcfb 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,10 @@ AC_CONFIG_SRCDIR([xrestop.c]) AM_INIT_AUTOMAKE() 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) +XORG_CWARNFLAGS AM_CONFIG_HEADER([config.h]) # Checks for programs. @@ -66,11 +70,7 @@ fi # check for ncurses, fall back to curses AC_CHECK_LIB([ncurses], [initscr],,AC_CHECK_LIB([curses], [initscr])) -if test "x$GCC" = "xyes"; then - GCC_WARNINGS="-Wall -fno-strict-aliasing" - XLIBS_CFLAGS="$GCC_WARNINGS $XLIBS_CFLAGS" -fi - +XLIBS_CFLAGS="$CWARNFLAGS $XLIBS_CFLAGS" AC_SUBST(XLIBS_CFLAGS) AC_SUBST(XLIBS_LIBS) @@ -87,4 +87,6 @@ AC_TYPE_PID_T AC_CHECK_FUNCS([memset strdup]) +XORG_CHANGELOG + AC_OUTPUT([Makefile doc/Makefile xrestop.spec]) @@ -167,7 +167,7 @@ untrap_errors(void) /* Misc util funcs */ -pid_t +static pid_t window_get_pid(XResTopApp *app, Window win) { Atom type; @@ -192,7 +192,7 @@ window_get_pid(XResTopApp *app, Window win) return result; } -char* +static char* window_get_utf8_name(XResTopApp *app, Window win) { Atom type; @@ -225,7 +225,7 @@ window_get_utf8_name(XResTopApp *app, Window win) } -void +static void nice_bytes(char *target, int target_size, unsigned long bytes) { char prefix = 'B'; @@ -248,7 +248,7 @@ nice_bytes(char *target, int target_size, unsigned long bytes) snprintf(target, target_size, "%li%c", value, prefix); } -void +static void usage(char *progname) { fprintf(stderr, @@ -265,7 +265,7 @@ usage(char *progname) /* Client struct stuff */ -XResTopClient* +static XResTopClient* xrestop_client_new(XResTopApp *app) { XResTopClient *client = NULL; @@ -278,7 +278,7 @@ xrestop_client_new(XResTopApp *app) return client; } -void +static void xrestop_client_free(XResTopClient *client) { if (client->identifier) XFree (client->identifier); @@ -368,7 +368,7 @@ recurse_win_tree(XResTopApp *app, XResTopClient *client, Window win_top) return w; } -void +static void xrestop_client_get_info(XResTopApp *app, XResTopClient *client) { Window found = None; @@ -400,7 +400,7 @@ xrestop_client_get_info(XResTopApp *app, XResTopClient *client) } } -void +static void xrestop_client_get_stats(XResTopApp *app, XResTopClient *client) { int j = 0; @@ -462,7 +462,7 @@ xrestop_client_get_stats(XResTopApp *app, XResTopClient *client) return; } -void +static void xrestop_populate_client_data(XResTopApp *app) { int i; @@ -498,7 +498,7 @@ xrestop_populate_client_data(XResTopApp *app) if (clients) XFree(clients); } -void +static void xrestop_display(XResTopApp *app) { int i; @@ -627,7 +627,7 @@ xrestop_display(XResTopApp *app) refresh(); } -int +static int xrestop_sort_compare(const void *a, const void *b) { XResTopClient *c1 = *(XResTopClient **)a; @@ -640,7 +640,7 @@ xrestop_sort_compare(const void *a, const void *b) } -void +static void xrestop_sort(XResTopApp *app) { qsort((void *)app->clients, app->n_clients, sizeof(app->clients[0]), xrestop_sort_compare); |