On Thu, 24 Mar 2011, Carlos R. Mafra wrote:

 > On Thu, 24 Mar 2011 at  1:10:15 +0100, Tamas TEVESZ wrote:
 > > 
 > > try this on top of the original one (without my first fix attempt), 
 > > let's see.
 > This one fixed it.

here are they in a unified form then.

-- 
[-]

mkdir /nonexistent
From d2c422ea86af937241ddc013e79b5c82f1060930 Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Mon, 21 Mar 2011 18:40:01 +0100
Subject: [PATCH 1/2] Adapt for libpng changes

---
 wrlib/png.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/wrlib/png.c b/wrlib/png.c
index b4d62cf..5cb9918 100644
--- a/wrlib/png.c
+++ b/wrlib/png.c
@@ -76,7 +76,11 @@ RImage *RLoadPNG(RContext * context, char *file)
 	}
 
 	RErrorCode = RERR_INTERNAL;
+#if PNG_LIBPNG_VER - 0 < 10400
 	if (setjmp(png->jmpbuf)) {
+#else
+	if (setjmp(png_jmpbuf(png))) {
+#endif
 		fclose(f);
 		png_destroy_read_struct(&png, &pinfo, &einfo);
 		if (image)
-- 
1.7.4.1

From 1ee9db98f24e1490c866c304cc817def8662e05a Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Thu, 24 Mar 2011 16:07:20 +0100
Subject: [PATCH] Remove warnings

* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
  to be tweaked on a per-implementation basis as problems arise)
---
 WINGs/WINGs/WINGsP.h            |    1 +
 WINGs/proplist.c                |    6 -----
 WINGs/string.c                  |   11 +++++++-
 WINGs/userdefaults.c            |    1 +
 WINGs/wcolorpanel.c             |    5 +--
 WINGs/wfontpanel.c              |    1 +
 WINGs/wlist.c                   |    3 --
 WINGs/wpopupbutton.c            |    3 +-
 WINGs/wscroller.c               |    8 ++++++
 WINGs/wsplitview.c              |    3 --
 WINGs/wtextfield.c              |    8 +-----
 WPrefs.app/Appearance.c         |    6 -----
 WPrefs.app/Menu.c               |   18 ++++++--------
 WPrefs.app/TexturePanel.c       |    3 --
 WPrefs.app/WPrefs.h             |    1 +
 WPrefs.app/main.c               |    3 +-
 WPrefs.app/xmodifier.c          |   18 +++++----------
 configure.ac                    |    3 +-
 src/application.c               |    2 -
 src/defaults.c                  |    6 +---
 src/dialog.c                    |    5 +---
 src/dock.c                      |    4 +-
 src/event.c                     |    3 ++
 src/icon.c                      |    4 +--
 src/main.c                      |    6 +----
 src/menu.c                      |    7 +-----
 src/misc.c                      |    3 +-
 src/moveres.c                   |   13 +---------
 src/osdep_bsd.c                 |    7 +++++
 src/rootmenu.c                  |    6 +---
 src/session.c                   |    1 +
 src/wdefaults.c                 |    1 +
 src/winspector.c                |    1 +
 src/workspace.c                 |    6 +---
 src/xmodifier.c                 |   47 +++++----------------------------------
 util/getstyle.c                 |    3 +-
 util/seticons.c                 |    3 +-
 util/setstyle.c                 |    1 +
 util/wdwrite.c                  |    3 +-
 util/wmagnify.c                 |    3 --
 util/wmgenmenu.c                |    1 +
 util/wmmenugen.c                |    6 -----
 util/wmmenugen_parse_wmconfig.c |    6 -----
 util/wmmenugen_parse_xdg.c      |    6 -----
 util/wmsetbg.c                  |    1 +
 45 files changed, 83 insertions(+), 174 deletions(-)

diff --git a/WINGs/WINGs/WINGsP.h b/WINGs/WINGs/WINGsP.h
index bb58906..a619a70 100644
--- a/WINGs/WINGs/WINGsP.h
+++ b/WINGs/WINGs/WINGsP.h
@@ -16,6 +16,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <stdio.h>
 
 #ifdef __cplusplus
diff --git a/WINGs/proplist.c b/WINGs/proplist.c
index 9e0d12b..4121494 100644
--- a/WINGs/proplist.c
+++ b/WINGs/proplist.c
@@ -1,10 +1,4 @@
 
-#if __GLIBC__ && \
-    (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) || \
-    !_XOPEN_SOURCE
-#define _XOPEN_SOURCE 500		/* nftw */
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 
diff --git a/WINGs/string.c b/WINGs/string.c
index c51a0f1..aabad31 100644
--- a/WINGs/string.c
+++ b/WINGs/string.c
@@ -1,3 +1,10 @@
+/*
+ * Until FreeBSD gets their act together;
+ * http://www.mail-archive.com/[email protected]/msg69469.html
+ */
+#if defined( FREEBSD )
+#   undef _XOPEN_SOURCE
+#endif
 
 #include "wconfig.h"
 
@@ -234,7 +241,7 @@ char *wstrappend(char *dst, char *src)
 }
 
 
-#ifdef HAVE_STRLCAT
+#if HAVE_STRLCAT
 size_t
 wstrlcat(char *dst, const char *src, size_t siz)
 {
@@ -295,7 +302,7 @@ wstrlcat(char *dst, const char *src, size_t siz)
 }
 #endif /* HAVE_STRLCAT */
 
-#ifdef HAVE_STRLCPY
+#if HAVE_STRLCPY
 size_t
 wstrlcpy(char *dst, const char *src, size_t siz)
 {
diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c
index 4eaed82..6de410e 100644
--- a/WINGs/userdefaults.c
+++ b/WINGs/userdefaults.c
@@ -1,6 +1,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <stdio.h>
 #include <assert.h>
 #include <unistd.h>
diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c
index ee419aa..7ebe8ba 100644
--- a/WINGs/wcolorpanel.c
+++ b/WINGs/wcolorpanel.c
@@ -2725,7 +2725,6 @@ static void customSetPalette(W_ColorPanel * panel)
 	W_Screen *scr = WMWidgetScreen(panel->win);
 	RImage *scaledImg;
 	Pixmap image;
-	int item;
 
 	image = XCreatePixmap(scr->display, W_DRAWABLE(scr), customPaletteWidth, customPaletteHeight, scr->depth);
 	scaledImg = RScaleImage(panel->customPaletteImg, customPaletteWidth, customPaletteHeight);
@@ -2751,7 +2750,7 @@ static void customSetPalette(W_ColorPanel * panel)
 	panel->palXRatio = (double)(panel->customPaletteImg->width) / (double)(customPaletteWidth);
 	panel->palYRatio = (double)(panel->customPaletteImg->height) / (double)(customPaletteHeight);
 
-	item = WMGetPopUpButtonSelectedItem(panel->customPaletteHistoryBtn);
+	WMGetPopUpButtonSelectedItem(panel->customPaletteHistoryBtn);
 }
 
 static void customPalettePositionSelection(W_ColorPanel * panel, int x, int y)
@@ -3366,7 +3365,7 @@ static int fetchFile(char *toPath, char *srcFile, char *destFile)
 			break;
 
 		RETRY( nwritten = fwrite(buf, 1, nread, dst) )
-		if (ferror(dst) || feof(src))
+		if (ferror(dst) || feof(src) || nread != nwritten)
 			break;
 
 	} while (1);
diff --git a/WINGs/wfontpanel.c b/WINGs/wfontpanel.c
index 53173a7..3cf14c8 100644
--- a/WINGs/wfontpanel.c
+++ b/WINGs/wfontpanel.c
@@ -5,6 +5,7 @@
 
 #include <ctype.h>
 #include <string.h>
+#include <strings.h>
 #include <stdint.h>
 
 #include <X11/Xft/Xft.h>
diff --git a/WINGs/wlist.c b/WINGs/wlist.c
index b58d68d..e855754 100644
--- a/WINGs/wlist.c
+++ b/WINGs/wlist.c
@@ -390,12 +390,9 @@ static void scrollByAmount(WMList * lPtr, int amount)
 static void vScrollCallBack(WMWidget * scroller, void *self)
 {
 	WMList *lPtr = (WMList *) self;
-	int height;
 	int oldTopItem = lPtr->topItem;
 	int itemCount = WMGetArrayItemCount(lPtr->items);
 
-	height = lPtr->view->size.height - 4;
-
 	switch (WMGetScrollerHitPart((WMScroller *) scroller)) {
 	case WSDecrementLine:
 		scrollByAmount(lPtr, -1);
diff --git a/WINGs/wpopupbutton.c b/WINGs/wpopupbutton.c
index 648039a..9982cc7 100644
--- a/WINGs/wpopupbutton.c
+++ b/WINGs/wpopupbutton.c
@@ -330,7 +330,7 @@ static void paintMenuEntry(PopUpButton * bPtr, int index, int highlight)
 {
 	W_Screen *scr = bPtr->view->screen;
 	int yo;
-	int width, height, itemHeight, itemCount;
+	int width, itemHeight, itemCount;
 	char *title;
 
 	itemCount = WMGetArrayItemCount(bPtr->items);
@@ -339,7 +339,6 @@ static void paintMenuEntry(PopUpButton * bPtr, int index, int highlight)
 
 	itemHeight = bPtr->view->size.height;
 	width = bPtr->view->size.width;
-	height = itemHeight * itemCount;
 	yo = (itemHeight - WMFontHeight(scr->normalFont)) / 2;
 
 	if (!highlight) {
diff --git a/WINGs/wscroller.c b/WINGs/wscroller.c
index 6afca48..671bb22 100644
--- a/WINGs/wscroller.c
+++ b/WINGs/wscroller.c
@@ -1,4 +1,12 @@
 
+/*
+ * Until FreeBSD gets their act together;
+ * http://www.mail-archive.com/[email protected]/msg69469.html
+ */
+#if defined( FREEBSD )
+#   undef _XOPEN_SOURCE
+#endif
+
 #include "WINGsP.h"
 
 #include <math.h>
diff --git a/WINGs/wsplitview.c b/WINGs/wsplitview.c
index 7568a37..e1dcd81 100644
--- a/WINGs/wsplitview.c
+++ b/WINGs/wsplitview.c
@@ -722,13 +722,10 @@ void WMRemoveSplitViewSubview(WMSplitView * sPtr, WMView * view)
 
 void WMRemoveSplitViewSubviewAt(WMSplitView * sPtr, int index)
 {
-	W_SplitViewSubview *p;
-
 	CHECK_CLASS(sPtr, WC_SplitView);
 
 	/* TODO: same about rewrite */
 	if (index >= 0 && index < _GetSubviewsCount()) {
-		p = _GetPSubviewStructAt(index);
 		WMDeleteFromArray(sPtr->subviews, index);
 		sPtr->flags.adjustOnPaint = 1;
 		paintSplitView(sPtr);
diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c
index 67cc230..4d4c645 100644
--- a/WINGs/wtextfield.c
+++ b/WINGs/wtextfield.c
@@ -755,7 +755,7 @@ static void paintTextField(TextField * tPtr)
 	W_Screen *screen = tPtr->view->screen;
 	W_View *view = tPtr->view;
 	W_View viewbuffer;
-	int tx, ty, tw, th;
+	int tx, ty, tw;
 	int rx;
 	int bd;
 	int totalWidth;
@@ -792,8 +792,6 @@ static void paintTextField(TextField * tPtr)
 	if (tPtr->textLen > 0) {
 		tw = WMWidthOfString(tPtr->font, &(text[tPtr->viewPosition]), tPtr->textLen - tPtr->viewPosition);
 
-		th = WMFontHeight(tPtr->font);
-
 		ty = tPtr->offsetWidth;
 		switch (tPtr->flags.alignment) {
 		case WALeft:
@@ -1334,7 +1332,6 @@ static void pasteText(WMView * view, Atom selection, Atom target, Time timestamp
 static void handleTextFieldActionEvents(XEvent * event, void *data)
 {
 	TextField *tPtr = (TextField *) data;
-	static int move = 0;
 	static Time lastButtonReleasedEvent = 0;
 	static Time lastButtonReleasedEvent2 = 0;
 	Display *dpy = event->xany.display;
@@ -1406,7 +1403,6 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
 			break;
 		}
 
-		move = 1;
 		switch (tPtr->flags.alignment) {
 			int textWidth;
 		case WARight:
@@ -1485,8 +1481,6 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
 			XStoreBuffer(dpy, &tPtr->text[start], count, 0);
 		}
 
-		move = 0;
-
 		if (!tPtr->flags.secure &&
 		    event->xbutton.time - lastButtonReleasedEvent <= WINGsConfiguration.doubleClickDelay) {
 
diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c
index 005db34..f266382 100644
--- a/WPrefs.app/Appearance.c
+++ b/WPrefs.app/Appearance.c
@@ -1060,8 +1060,6 @@ static void changePage(WMWidget * w, void *data)
 {
 	_Panel *panel = (_Panel *) data;
 	int section;
-	WMListItem *item;
-	TextureListItem *titem;
 	WMScreen *scr = WMWidgetScreen(panel->box);
 	RContext *rc = WMScreenRContext(scr);
 	static WMPoint positions[] = {
@@ -1080,10 +1078,6 @@ static void changePage(WMWidget * w, void *data)
 		WMSelectListItem(panel->texLs, panel->textureIndex[section]);
 
 		WMSetListPosition(panel->texLs, panel->textureIndex[section] - 2);
-
-		item = WMGetListItem(panel->texLs, panel->textureIndex[section]);
-
-		titem = (TextureListItem *) item->clientData;
 	}
 	{
 		WMColor *color;
diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index c179e68..66b24d1 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -466,20 +466,18 @@ static void createPanel(_Panel * p)
 
 	{
 		WEditMenu *pad;
-		WEditMenu *smenu;
-		ItemData *data;
 
 		pad = makeFactoryMenu(panel->box, 150);
 		WMMoveWidget(pad, 10, 40);
 
-		data = putNewItem(panel, pad, ExecInfo, _("Run Program"));
-		data = putNewItem(panel, pad, CommandInfo, _("Internal Command"));
-		smenu = putNewSubmenu(pad, _("Submenu"));
-		data = putNewItem(panel, pad, ExternalInfo, _("External Submenu"));
-		data = putNewItem(panel, pad, PipeInfo, _("Generated Submenu"));
-		data = putNewItem(panel, pad, DirectoryInfo, _("Directory Contents"));
-		data = putNewItem(panel, pad, WSMenuInfo, _("Workspace Menu"));
-		data = putNewItem(panel, pad, WWindowListInfo, _("Window List Menu"));
+		putNewItem(panel, pad, ExecInfo, _("Run Program"));
+		putNewItem(panel, pad, CommandInfo, _("Internal Command"));
+		putNewSubmenu(pad, _("Submenu"));
+		putNewItem(panel, pad, ExternalInfo, _("External Submenu"));
+		putNewItem(panel, pad, PipeInfo, _("Generated Submenu"));
+		putNewItem(panel, pad, DirectoryInfo, _("Directory Contents"));
+		putNewItem(panel, pad, WSMenuInfo, _("Workspace Menu"));
+		putNewItem(panel, pad, WWindowListInfo, _("Window List Menu"));
 
 		panel->itemPad[0] = pad;
 	}
diff --git a/WPrefs.app/TexturePanel.c b/WPrefs.app/TexturePanel.c
index 15dd890..ae3ee64 100644
--- a/WPrefs.app/TexturePanel.c
+++ b/WPrefs.app/TexturePanel.c
@@ -427,7 +427,6 @@ static void paintGradListItem(WMList * lPtr, int index, Drawable d, char *text,
 	WMColor *white = WMWhiteColor(scr);
 	WMColor *black = WMBlackColor(scr);
 	WMColor *gray = WMGrayColor(scr);
-	WMListItem *item;
 	int width, height, x, y;
 	Display *dpy;
 
@@ -443,8 +442,6 @@ static void paintGradListItem(WMList * lPtr, int index, Drawable d, char *text,
 	else
 		XFillRectangle(dpy, d, WMColorGC(gray), x, y, width, height);
 
-	item = WMGetListItem(lPtr, index);
-
 	if (panel->gimage) {
 		XCopyArea(WMScreenDisplay(scr), panel->gimage, d, WMColorGC(white),
 			  0, height * index, 30, height, x + 5, y);
diff --git a/WPrefs.app/WPrefs.h b/WPrefs.app/WPrefs.h
index f1e348c..9242f10 100644
--- a/WPrefs.app/WPrefs.h
+++ b/WPrefs.app/WPrefs.h
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 #include <signal.h>
 
 #include <X11/Xlib.h>
diff --git a/WPrefs.app/main.c b/WPrefs.app/main.c
index 40e0134..9204e89 100644
--- a/WPrefs.app/main.c
+++ b/WPrefs.app/main.c
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
 {
 	Display *dpy;
 	WMScreen *scr;
-	char *locale, *path;
+	char *path;
 	int i;
 	char *display_name = "";
 
@@ -131,7 +131,6 @@ int main(int argc, char **argv)
 		}
 	}
 
-	locale = getenv("LANG");
 	setlocale(LC_ALL, "");
 
 #ifdef I18N
diff --git a/WPrefs.app/xmodifier.c b/WPrefs.app/xmodifier.c
index 7bcb9d4..35046f2 100644
--- a/WPrefs.app/xmodifier.c
+++ b/WPrefs.app/xmodifier.c
@@ -32,6 +32,7 @@ Perpetrator: Sudish Joseph <[email protected]>, Sept. 1997. */
  Boston, MA 02110-1301 USA. */
 
 #include <string.h>
+#include <strings.h>
 #include <X11/Xlib.h>
 #include <X11/keysym.h>
 
@@ -110,9 +111,6 @@ static const char *index_to_name(int indice)
 static void x_reset_modifier_mapping(Display * display)
 {
 	int modifier_index, modifier_key, column, mkpm;
-	int warned_about_overlapping_modifiers = 0;
-	int warned_about_predefined_modifiers = 0;
-	int warned_about_duplicate_modifiers = 0;
 	int meta_bit = 0;
 	int hyper_bit = 0;
 	int super_bit = 0;
@@ -122,26 +120,22 @@ static void x_reset_modifier_mapping(Display * display)
 
 #define modwarn(name,old,other)							\
     wwarning ("%s (0x%x) generates %s, which is generated by %s.",		\
-    name, code, index_to_name (old), other),					\
-    warned_about_overlapping_modifiers = 1
+    name, code, index_to_name (old), other)
 
 #define modbarf(name,other)							\
     wwarning ("%s (0x%x) generates %s, which is nonsensical.",			\
-    name, code, other),								\
-    warned_about_predefined_modifiers = 1
+    name, code, other)
 
 #define check_modifier(name,mask)						\
     if ((1<<modifier_index) != mask)						\
     wwarning ("%s (0x%x) generates %s, which is nonsensical.",			\
-    name, code, index_to_name (modifier_index)),				\
-    warned_about_predefined_modifiers = 1
+    name, code, index_to_name (modifier_index))
 
 #define store_modifier(name,old)						\
     if (old && old != modifier_index)						\
     wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.",	\
     name, code, index_to_name (old),						\
-    index_to_name (modifier_index)),						\
-    warned_about_duplicate_modifiers = 1;					\
+    index_to_name (modifier_index));						\
     if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift");		\
     else if (modifier_index == LockMapIndex) modbarf (name,"ModLock");		\
     else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl");	\
@@ -253,7 +247,7 @@ static void x_reset_modifier_mapping(Display * display)
 			warn = "Alt", alt_bit = 0;
 		if (warn) {
 			wwarning("%s is being used for both Mode_switch and %s.",
-			     index_to_name(mode_bit), warn), warned_about_overlapping_modifiers = 1;
+			     index_to_name(mode_bit), warn);
 		}
 	}
 
diff --git a/configure.ac b/configure.ac
index f108424..f9abd47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,10 +82,11 @@ dnl ================================
 case "${host}" in
 	*-*-linux*|*-*-cygwin*)
 		WM_OSDEP="linux"
+		CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600"
 	;;
 	*-*-freebsd*)
 		WM_OSDEP="bsd"
-		CFLAGS="$CFLAGS -DFREEBSD"
+		CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -DFREEBSD"
 	;;
 	*-*-netbsd*)
 		WM_OSDEP="bsd"
diff --git a/src/application.c b/src/application.c
index f3993ff..8f64770 100644
--- a/src/application.c
+++ b/src/application.c
@@ -377,7 +377,6 @@ WApplication *wApplicationCreate(WWindow * wwin)
 
 void wApplicationDestroy(WApplication * wapp)
 {
-	Window main_window;
 	WWindow *wwin;
 	WScreen *scr;
 
@@ -400,7 +399,6 @@ void wApplicationDestroy(WApplication * wapp)
 	}
 
 	scr = wapp->main_window_desc->screen_ptr;
-	main_window = wapp->main_window;
 
 	if (wapp == scr->wapp_list) {
 		if (wapp->next)
diff --git a/src/defaults.c b/src/defaults.c
index 9f953b1..70c8a8a 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <strings.h>
 #include <ctype.h>
 #include <time.h>
 #include <sys/types.h>
@@ -1009,14 +1010,12 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
 {
 	WMPropList *plvalue, *old_value;
 	WDefaultEntry *entry;
-	unsigned int i, must_update;
+	unsigned int i;
 	int update_workspace_back = 0;	/* kluge :/ */
 	unsigned int needs_refresh;
 	void *tdata;
 	WMPropList *old_dict = (WDWindowMaker->dictionary != new_dict ? WDWindowMaker->dictionary : NULL);
 
-	must_update = 0;
-
 	needs_refresh = 0;
 
 	for (i = 0; i < sizeof(optionList) / sizeof(WDefaultEntry); i++) {
@@ -1037,7 +1036,6 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
 			plvalue = entry->plvalue;
 			if (plvalue && new_dict) {
 				WMPutInPLDictionary(new_dict, entry->plkey, plvalue);
-				must_update = 1;
 			}
 		} else if (!plvalue) {
 			/* value was deleted from DB. Keep current value */
diff --git a/src/dialog.c b/src/dialog.c
index 576220d..904eac3 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -808,7 +808,6 @@ static void keyPressHandler(XEvent * event, void *data)
 {
 	IconPanel *panel = (IconPanel *) data;
 	char buffer[32];
-	int count;
 	KeySym ksym;
 	int iidx;
 	int didx;
@@ -819,7 +818,7 @@ static void keyPressHandler(XEvent * event, void *data)
 		return;
 
 	buffer[0] = 0;
-	count = XLookupString(&event->xkey, buffer, sizeof(buffer), &ksym, NULL);
+	XLookupString(&event->xkey, buffer, sizeof(buffer), &ksym, NULL);
 
 	iidx = WMGetListSelectedItemRow(panel->iconList);
 	didx = WMGetListSelectedItemRow(panel->dirList);
@@ -1103,7 +1102,6 @@ void wShowInfoPanel(WScreen * scr)
 {
 	InfoPanel *panel;
 	WMPixmap *logo;
-	WMSize size;
 	WMFont *font;
 	char *strbuf = NULL;
 	char buffer[256];
@@ -1142,7 +1140,6 @@ void wShowInfoPanel(WScreen * scr)
 		logo = WMRetainPixmap(WMGetApplicationIconPixmap(scr->wmscreen));
 	}
 	if (logo) {
-		size = WMGetPixmapSize(logo);
 		panel->logoL = WMCreateLabel(panel->win);
 		WMResizeWidget(panel->logoL, 64, 64);
 		WMMoveWidget(panel->logoL, 30, 20);
diff --git a/src/dock.c b/src/dock.c
index 736823c..5e7cc93 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -26,6 +26,7 @@
 #include <X11/Xutil.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 #include <math.h>
 #include <limits.h>
@@ -2262,10 +2263,9 @@ Bool wDockSnapIcon(WDock * dock, WAppIcon * icon, int req_x, int req_y, int *ret
 	int i, offset = ICON_SIZE / 2;
 	WAppIcon *aicon = NULL;
 	WAppIcon *nicon = NULL;
-	int max_y_icons, max_x_icons;
+	int max_y_icons;
 
 	/* TODO: XINERAMA, for these */
-	max_x_icons = scr->scr_width / ICON_SIZE;
 	max_y_icons = scr->scr_height / ICON_SIZE - 1;
 
 	if (wPreferences.flags.noupdates)
diff --git a/src/event.c b/src/event.c
index 57197b7..e45cdc2 100644
--- a/src/event.c
+++ b/src/event.c
@@ -22,6 +22,7 @@
 #include "wconfig.h"
 
 #ifdef HAVE_INOTIFY
+#include <sys/select.h>
 #include <sys/inotify.h>
 #endif
 
@@ -29,6 +30,8 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <strings.h>
+#include <time.h>
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
diff --git a/src/icon.c b/src/icon.c
index 9f45e8f..5660d6b 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -625,7 +625,7 @@ void wIconUpdate(WIcon * icon)
 		int x, y;
 		unsigned int w, h;
 		Window jw;
-		int ji, dotitle;
+		int ji;
 		unsigned int ju, d;
 		Pixmap pixmap;
 
@@ -646,7 +646,6 @@ void wIconUpdate(WIcon * icon)
 
 		if (icon->show_title && (title_height < wPreferences.icon_size)) {
 			drawIconTitle(scr, pixmap, title_height);
-			dotitle = 1;
 
 			if (h > wPreferences.icon_size - title_height - 2) {
 				h = wPreferences.icon_size - title_height - 2;
@@ -655,7 +654,6 @@ void wIconUpdate(WIcon * icon)
 				y = (wPreferences.icon_size - h - title_height) / 2 + title_height + 1;
 			}
 		} else {
-			dotitle = 0;
 			if (w > wPreferences.icon_size)
 				w = wPreferences.icon_size;
 			y = (wPreferences.icon_size - h) / 2;
diff --git a/src/main.c b/src/main.c
index 41c011b..c17dcef 100644
--- a/src/main.c
+++ b/src/main.c
@@ -592,10 +592,9 @@ int main(int argc, char **argv)
 
 static int real_main(int argc, char **argv)
 {
-	int i, restart = 0;
+	int i;
 	char *pos;
 	int d, s;
-	int flag;
 
 	setlocale(LC_ALL, "");
 	wsetabort(wAbort);
@@ -603,7 +602,6 @@ static int real_main(int argc, char **argv)
 	/* for telling WPrefs what's the name of the wmaker binary being ran */
 	setenv("WMAKER_BIN_NAME", argv[0], 1);
 
-	flag = 0;
 	ArgCount = argc;
 	Arguments = wmalloc(sizeof(char *) * (ArgCount + 1));
 	for (i = 0; i < argc; i++) {
@@ -619,8 +617,6 @@ static int real_main(int argc, char **argv)
 	else
 		ProgName++;
 
-	restart = 0;
-
 	if (argc > 1) {
 		for (i = 1; i < argc; i++) {
 #ifdef USECPP
diff --git a/src/menu.c b/src/menu.c
index dafdbdd..11e6a7f 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -802,7 +802,7 @@ static void move_menus(WMenu * menu, int x, int y)
 static void makeVisible(WMenu * menu)
 {
 	WScreen *scr = menu->frame->screen_ptr;
-	int x1, y1, x2, y2, new_x, new_y, move;
+	int x1, y1, x2, y2, new_x, new_y;
 	WMRect rect = wGetRectForHead(scr, wGetHeadForPointerLocation(scr));
 
 	if (menu->entry_no < 0)
@@ -815,22 +815,17 @@ static void makeVisible(WMenu * menu)
 
 	new_x = x1;
 	new_y = y1;
-	move = 0;
 
 	if (x1 < rect.pos.x) {
 		new_x = rect.pos.x;
-		move = 1;
 	} else if (x2 >= rect.pos.x + rect.size.width) {
 		new_x = rect.pos.x + rect.size.width - MENUW(menu) - 1;
-		move = 1;
 	}
 
 	if (y1 < rect.pos.y) {
 		new_y = rect.pos.y;
-		move = 1;
 	} else if (y2 >= rect.pos.y + rect.size.height) {
 		new_y = rect.pos.y + rect.size.height - menu->entry_height - 1;
-		move = 1;
 	}
 
 	new_y = new_y - menu->frame->top_width - menu->selected_entry * menu->entry_height;
diff --git a/src/misc.c b/src/misc.c
index 0502297..3381c2a 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 #include <stdarg.h>
 #include <pwd.h>
@@ -92,14 +93,12 @@ static char *username(void)
 
 char *MakeCPPArgs(char *path)
 {
-	int i;
 	char buffer[MAXLINE], *buf, *line;
 	Visual *visual;
 	char *tmp;
 
 	line = wmalloc(MAXLINE);
 	*line = 0;
-	i = 1;
 	if ((buf = getenv("HOSTNAME")) != NULL) {
 		if (buf[0] == '(') {
 			wwarning(_("your machine is misconfigured. HOSTNAME is set to %s"), buf);
diff --git a/src/moveres.c b/src/moveres.c
index c0bf039..2ac3fbe 100644
--- a/src/moveres.c
+++ b/src/moveres.c
@@ -902,14 +902,11 @@ updateWindowPosition(WWindow * wwin, MoveData * data, Bool doResistance,
 	int winL, winR, winT, winB;	/* requested new window position */
 	int newX, newY;		/* actual new window position */
 	Bool hresist, vresist;
-	Bool updateIndex;
 	Bool attract;
 
 	hresist = False;
 	vresist = False;
 
-	updateIndex = False;
-
 	/* check the direction of the movement */
 	dx = newMouseX - data->mouseX;
 	dy = newMouseY - data->mouseY;
@@ -1211,7 +1208,7 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
 	int done, off_x, off_y, ww, wh;
 	int kspeed = _KS;
 	Time lastTime = 0;
-	KeyCode shiftl, shiftr, ctrll, ctrlmode;
+	KeyCode shiftl, shiftr, ctrlmode;
 	KeySym keysym = NoSymbol;
 	int moment = 0;
 	int modes = ((IS_MOVABLE(wwin) ? MOVABLE_BIT : 0) | (IS_RESIZABLE(wwin) ? RESIZABLE_BIT : 0));
@@ -1221,7 +1218,6 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
 
 	shiftl = XKeysymToKeycode(dpy, XK_Shift_L);
 	shiftr = XKeysymToKeycode(dpy, XK_Shift_R);
-	ctrll = XKeysymToKeycode(dpy, XK_Control_L);
 	ctrlmode = done = off_x = off_y = 0;
 
 	if (modes == RESIZABLE_BIT) {
@@ -1851,7 +1847,6 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
 	int rx1, ry1, rx2, ry2;
 	int res = 0;
 	KeyCode shiftl, shiftr;
-	int h = 0;
 	int orig_fx = fx;
 	int orig_fy = fy;
 	int orig_fw = fw;
@@ -1878,11 +1873,7 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
 	ry2 = fy + fh - 1;
 	shiftl = XKeysymToKeycode(dpy, XK_Shift_L);
 	shiftr = XKeysymToKeycode(dpy, XK_Shift_R);
-	if (HAS_TITLEBAR(wwin))
-		h = WMFontHeight(wwin->screen_ptr->title_font) + (wPreferences.window_title_clearance +
-								  TITLEBAR_EXTEND_SPACE) * 2;
-	else
-		h = 0;
+
 	while (1) {
 		WMMaskEvent(dpy, KeyPressMask | ButtonMotionMask
 			    | ButtonReleaseMask | PointerMotionHintMask | ButtonPressMask | ExposureMask, &event);
diff --git a/src/osdep_bsd.c b/src/osdep_bsd.c
index e3063a9..372b4cf 100644
--- a/src/osdep_bsd.c
+++ b/src/osdep_bsd.c
@@ -1,3 +1,10 @@
+/*
+ * Until FreeBSD gets their act together;
+ * http://www.mail-archive.com/[email protected]/msg69469.html
+ */
+#if defined( FREEBSD )
+#   undef _XOPEN_SOURCE
+#endif
 
 #if defined( FREEBSD ) || defined( DRAGONFLYBSD )
 #   include <sys/types.h>
diff --git a/src/rootmenu.c b/src/rootmenu.c
index 1730688..5592f73 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -29,6 +29,7 @@
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <string.h>
+#include <strings.h>
 #include <ctype.h>
 #include <time.h>
 #include <dirent.h>
@@ -1151,7 +1152,7 @@ static WMenu *readMenuFile(WScreen * scr, char *file_name)
 		}
 	}
 
-#ifdef CPP
+#ifdef USECPP
 	if (cpp) {
 		if (pclose(file) == -1) {
 			werror(_("error reading preprocessed menu data"));
@@ -1183,7 +1184,6 @@ static WMenu *readMenuPipe(WScreen * scr, char **file_name)
 	int i;
 #ifdef USECPP
 	char *args;
-	int cpp = 0;
 #endif
 
 	flat_file[0] = '\0';
@@ -1206,8 +1206,6 @@ static WMenu *readMenuPipe(WScreen * scr, char **file_name)
 			file = popen(command, "r");
 			if (!file) {
 				werror(_("%s:could not open/preprocess menu file"), filename);
-			} else {
-				cpp = 1;
 			}
 		}
 	}
diff --git a/src/session.c b/src/session.c
index 5d72ef1..4a50f78 100644
--- a/src/session.c
+++ b/src/session.c
@@ -65,6 +65,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 #include <time.h>
 
diff --git a/src/wdefaults.c b/src/wdefaults.c
index 26c6a26..ffe3b20 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <strings.h>
 #include <ctype.h>
 
 #include <X11/Xlib.h>
diff --git a/src/winspector.c b/src/winspector.c
index 53f2634..8b14094 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 
 #include "WindowMaker.h"
 #include "screen.h"
diff --git a/src/workspace.c b/src/workspace.c
index bfe85e8..b726f7f 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -647,12 +647,11 @@ static void newWSCommand(WMenu * menu, WMenuEntry * foo)
 
 static char *cropline(char *line)
 {
-	char *start, *end;
+	char *end;
 
 	if (strlen(line) == 0)
 		return line;
 
-	start = line;
 	end = &(line[strlen(line)]) - 1;
 	while (isspace(*line) && *line != 0)
 		line++;
@@ -821,7 +820,7 @@ void wWorkspaceSaveState(WScreen * scr, WMPropList * old_state)
 void wWorkspaceRestoreState(WScreen * scr)
 {
 	WMPropList *parr, *pstr, *wks_state, *clip_state;
-	int i, j, wscount;
+	int i, j;
 
 	make_keys();
 
@@ -833,7 +832,6 @@ void wWorkspaceRestoreState(WScreen * scr)
 	if (!parr)
 		return;
 
-	wscount = scr->workspace_count;
 	for (i = 0; i < WMIN(WMGetPropListItemCount(parr), MAX_WORKSPACES); i++) {
 		wks_state = WMGetFromPLArray(parr, i);
 		if (WMIsPLDictionary(wks_state))
diff --git a/src/xmodifier.c b/src/xmodifier.c
index 0298f62..7bae013 100644
--- a/src/xmodifier.c
+++ b/src/xmodifier.c
@@ -30,6 +30,7 @@ Perpetrator: Sudish Joseph <[email protected]>, Sept. 1997. */
 #include "wconfig.h"
 
 #include <string.h>
+#include <strings.h>
 #include <X11/Xlib.h>
 #include <X11/keysym.h>
 
@@ -111,9 +112,6 @@ static const char *index_to_name(int indice)
 static void x_reset_modifier_mapping(Display * display)
 {
 	int modifier_index, modifier_key, column, mkpm;
-	int warned_about_overlapping_modifiers = 0;
-	int warned_about_predefined_modifiers = 0;
-	int warned_about_duplicate_modifiers = 0;
 	int meta_bit = 0;
 	int hyper_bit = 0;
 	int super_bit = 0;
@@ -123,26 +121,22 @@ static void x_reset_modifier_mapping(Display * display)
 
 #define modwarn(name,old,other)							\
     wwarning ("%s (0x%x) generates %s, which is generated by %s.",		\
-    name, code, index_to_name (old), other),					\
-    warned_about_overlapping_modifiers = 1
+    name, code, index_to_name (old), other)
 
 #define modbarf(name,other)							\
     wwarning ("%s (0x%x) generates %s, which is nonsensical.",			\
-    name, code, other),								\
-    warned_about_predefined_modifiers = 1
+    name, code, other)
 
 #define check_modifier(name,mask)						\
     if ((1<<modifier_index) != mask)						\
     wwarning ("%s (0x%x) generates %s, which is nonsensical.",			\
-    name, code, index_to_name (modifier_index)),				\
-    warned_about_predefined_modifiers = 1
+    name, code, index_to_name (modifier_index))
 
 #define store_modifier(name,old)						\
     if (old && old != modifier_index)						\
     wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.",	\
     name, code, index_to_name (old),						\
-    index_to_name (modifier_index)),						\
-    warned_about_duplicate_modifiers = 1;					\
+    index_to_name (modifier_index));						\
     if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift");		\
     else if (modifier_index == LockMapIndex) modbarf (name,"ModLock");		\
     else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl");	\
@@ -254,7 +248,7 @@ static void x_reset_modifier_mapping(Display * display)
 			warn = "Alt", alt_bit = 0;
 		if (warn) {
 			wwarning("%s is being used for both Mode_switch and %s.",
-			     index_to_name(mode_bit), warn), warned_about_overlapping_modifiers = 1;
+			     index_to_name(mode_bit), warn);
 		}
 	}
 
@@ -264,35 +258,6 @@ static void x_reset_modifier_mapping(Display * display)
 	AltMask = (alt_bit ? (1 << alt_bit) : 0);
 	ModeMask = (mode_bit ? (1 << mode_bit) : 0);	/* unused */
 
-#if 0
-	if (warned_about_overlapping_modifiers)
-		wwarning("\n"
-			 "	Two distinct modifier keys (such as Meta and Hyper) cannot generate\n"
-			 "	the same modifier bit, because Emacs won't be able to tell which\n"
-			 "	modifier was actually held down when some other key is pressed.  It\n"
-			 "	won't be able to tell Meta-x and Hyper-x apart, for example.  Change\n"
-			 "	one of these keys to use some other modifier bit.  If you intend for\n"
-			 "	these keys to have the same behavior, then change them to have the\n"
-			 "	same keysym as well as the same modifier bit.\n");
-
-	if (warned_about_predefined_modifiers)
-		wwarning("\n"
-			 "	The semantics of the modifier bits ModShift, ModLock, and ModControl\n"
-			 "	are predefined.  It does not make sense to assign ModControl to any\n"
-			 "	keysym other than Control_L or Control_R, or to assign any modifier\n"
-			 "	bits to the \"control\" keysyms other than ModControl.  You can't\n"
-			 "	turn a \"control\" key into a \"meta\" key (or vice versa) by simply\n"
-			 "	assigning the key a different modifier bit.  You must also make that\n"
-			 "	key generate an appropriate keysym (Control_L, Meta_L, etc).\n");
-
-	/* No need to say anything more for warned_about_duplicate_modifiers. */
-
-	if (warned_about_overlapping_modifiers || warned_about_predefined_modifiers)
-		wwarning("\n"
-			 "	The meanings of the modifier bits Mod1 through Mod5 are determined\n"
-			 "	by the keysyms used to control those bits.  Mod1 does NOT always\n"
-			 "	mean Meta, although some non-ICCCM-compliant programs assume that.\n");
-#endif
 	XFreeModifiermap(x_modifier_keymap);
 }
 
diff --git a/util/getstyle.c b/util/getstyle.c
index a29b1a9..1a9ac31 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -35,6 +35,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 
 #include <WINGs/WUtil.h>
@@ -216,7 +217,7 @@ void copyFile(char *dir, char *file)
 			break;
 
 		RETRY( nwritten = fwrite(buf, 1, nread, dst) )
-		if (ferror(dst) || feof(src))
+		if (ferror(dst) || feof(src) || nread != nwritten)
 			break;
 
 	} while (1);
diff --git a/util/seticons.c b/util/seticons.c
index 87bdf4f..d70b828 100644
--- a/util/seticons.c
+++ b/util/seticons.c
@@ -48,7 +48,7 @@ void print_help(int print_usage, int exitval)
 
 int main(int argc, char **argv)
 {
-	WMPropList *window_name, *icon_key, *window_attrs, *icon_value;
+	WMPropList *window_name, *window_attrs, *icon_value;
 	WMPropList *all_windows, *iconset, *keylist;
 	int i, ch;
 	char *path = NULL;
@@ -96,7 +96,6 @@ int main(int argc, char **argv)
 	}
 
 	keylist = WMGetPLDictionaryKeys(iconset);
-	icon_key = WMCreatePLString("Icon");
 
 	for (i = 0; i < WMGetPropListItemCount(keylist); i++) {
 		window_name = WMGetFromPLArray(keylist, i);
diff --git a/util/setstyle.c b/util/setstyle.c
index 1f6ca3d..a0d764d 100644
--- a/util/setstyle.c
+++ b/util/setstyle.c
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <unistd.h>
 #include <X11/Xlib.h>
 
diff --git a/util/wdwrite.c b/util/wdwrite.c
index a8b83e4..e494c0a 100644
--- a/util/wdwrite.c
+++ b/util/wdwrite.c
@@ -56,7 +56,7 @@ void print_help(int print_usage, int exitval)
 int main(int argc, char **argv)
 {
 	char path[PATH_MAX];
-	WMPropList *dom, *key, *value, *dict;
+	WMPropList *key, *value, *dict;
 	int ch;
 
 	struct option longopts[] = {
@@ -87,7 +87,6 @@ int main(int argc, char **argv)
 	if (argc != 3)
 		print_help(0, 1);
 
-	dom = WMCreatePLString(argv[0]);
 	key = WMCreatePLString(argv[1]);
 	value = WMCreatePropListFromDescription(argv[2]);
 	if (!value) {
diff --git a/util/wmagnify.c b/util/wmagnify.c
index d65d540..7b085b5 100644
--- a/util/wmagnify.c
+++ b/util/wmagnify.c
@@ -397,7 +397,6 @@ static BufferData *newWindow(int magfactor)
 
 int main(int argc, char **argv)
 {
-	BufferData *data;
 	int i;
 	char *display = "";
 	char *vdisplay = NULL;
@@ -481,8 +480,6 @@ int main(int argc, char **argv)
 	cursorColor1 = WMCreateNamedColor(scr, "#ff0000", False);
 	cursorColor2 = WMCreateNamedColor(scr, "#00ff00", False);
 
-	data = newWindow(magfactor);
-
 	WMScreenMainLoop(scr);
 
 	return 0;
diff --git a/util/wmgenmenu.c b/util/wmgenmenu.c
index b7793cf..18aba9a 100644
--- a/util/wmgenmenu.c
+++ b/util/wmgenmenu.c
@@ -4,6 +4,7 @@
 #define _GNU_SOURCE		/* getopt_long */
 #endif
 
+#include <ctype.h>
 #include <getopt.h>
 #include <limits.h>
 #include <locale.h>
diff --git a/util/wmmenugen.c b/util/wmmenugen.c
index c6d5099..82ad8ce 100644
--- a/util/wmmenugen.c
+++ b/util/wmmenugen.c
@@ -18,12 +18,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#if __GLIBC__ && \
-    (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) || \
-    !_XOPEN_SOURCE
-#define _XOPEN_SOURCE 500		/* nftw */
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 
diff --git a/util/wmmenugen_parse_wmconfig.c b/util/wmmenugen_parse_wmconfig.c
index bc73b29..12fcb14 100644
--- a/util/wmmenugen_parse_wmconfig.c
+++ b/util/wmmenugen_parse_wmconfig.c
@@ -20,12 +20,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#if __GLIBC__ && \
-    (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) || \
-    !_XOPEN_SOURCE
-#define _XOPEN_SOURCE 500		/* nftw */
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 
diff --git a/util/wmmenugen_parse_xdg.c b/util/wmmenugen_parse_xdg.c
index f68834f..14fdee7 100644
--- a/util/wmmenugen_parse_xdg.c
+++ b/util/wmmenugen_parse_xdg.c
@@ -36,12 +36,6 @@
  * Basic validation of the .desktop file is done.
  */
 
-#if __GLIBC__ && \
-    (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) || \
-    !_XOPEN_SOURCE
-#define _XOPEN_SOURCE 500		/* nftw */
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 
diff --git a/util/wmsetbg.c b/util/wmsetbg.c
index 856587d..17b0583 100644
--- a/util/wmsetbg.c
+++ b/util/wmsetbg.c
@@ -31,6 +31,7 @@
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 #include <string.h>
+#include <strings.h>
 #include <pwd.h>
 #include <signal.h>
 #include <sys/types.h>
-- 
1.7.0.4

Reply via email to