From 0c469de04fcd804ceaa15d3f17c40b57f7ad6cee Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Mon, 10 Nov 2008 01:35:57 +0100 Subject: [PATCH] Fix gcc warnings This patch fixes the following warnings (with gcc 4.2.3) defaults.c:980: warning: unused variable 'replace' main.c:504: warning: 'watchPath' may be used uninitialized in this function main.c:504: note: 'watchPath' was declared here startup.c:616: warning: implicit declaration of function 'XrmUniqueQuark' --- src/defaults.c | 2 +- src/main.c | 2 +- src/startup.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/defaults.c b/src/defaults.c index d7fbb605..ba789d34 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -977,7 +977,7 @@ static Bool fixupCachedPixmapsPaths(WMPropList *dict) { WMPropList *allApps, *app, *props, *iconkey, *icon, *newicon; - char *path, *fixedpath, *ptr, *search, *replace; + char *path, *fixedpath, *ptr, *search; int i, len, slen; Bool changed = False; diff --git a/src/main.c b/src/main.c index b61ad70e..6441c8d7 100644 --- a/src/main.c +++ b/src/main.c @@ -501,7 +501,7 @@ check_defaults() static void inotifyWatchConfig() { - char *watchPath; + char *watchPath = NULL; inotifyFD = inotify_init(); /* Initialise an inotify instance */ if (inotifyFD < 0) { wwarning(_("could not initialise an inotify instance." diff --git a/src/startup.c b/src/startup.c index af0c8e30..9f75b4ab 100644 --- a/src/startup.c +++ b/src/startup.c @@ -34,6 +34,7 @@ #endif #include +#include #include #include #include