1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-10 15:54:17 +01:00

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)
This commit is contained in:
Tamas TEVESZ
2011-03-24 16:07:20 +01:00
committed by Carlos R. Mafra
parent 43c7abe79f
commit f65b99e615
45 changed files with 83 additions and 174 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <signal.h>
#include <X11/Xlib.h>

View File

@@ -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

View File

@@ -32,6 +32,7 @@ Perpetrator: Sudish Joseph <sj@eng.mindspring.net>, 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);
}
}