1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-05 05:14:13 +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

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