summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-07-16 04:33:26 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-07-16 05:19:24 -0400
commit43e36f1b95c40966c6e6e3ae4acd5c2974b1cc53 (patch)
treedc9ae9fbd2a1ac5d420b1f86850188755656344f
parent0c045ca14adb853932e39ae5c2d07f9008ab4ee8 (diff)
gcc-stricter warnings, no object change
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--src/cursor.c2
-rw-r--r--src/events.c8
-rw-r--r--src/menus.c2
-rw-r--r--src/parse.c4
-rw-r--r--src/session.c20
-rw-r--r--src/twm.c16
-rw-r--r--src/util.c4
7 files changed, 28 insertions, 28 deletions
diff --git a/src/cursor.c b/src/cursor.c
index cfe0a09..9a0cb28 100644
--- a/src/cursor.c
+++ b/src/cursor.c
@@ -127,7 +127,7 @@ NewFontCursor (Cursor *cp, const char *str)
{
int i;
- for (i = 0; i < sizeof(cursor_names)/sizeof(struct _CursorName); i++)
+ for (i = 0; (size_t)i < sizeof(cursor_names)/sizeof(struct _CursorName); i++)
{
if (strcmp(str, cursor_names[i].name) == 0)
{
diff --git a/src/events.c b/src/events.c
index 9f5d239..68d9749 100644
--- a/src/events.c
+++ b/src/events.c
@@ -595,7 +595,7 @@ HandleKeyPress(void)
for (key = Scr->FuncKeyRoot.next; key != NULL; key = key->next)
{
if (key->keysym == ks &&
- key->mods == modifier &&
+ (unsigned)key->mods == modifier &&
(key->cont == Context || key->cont == C_NAME))
{
/* weed out the functions that don't make sense to execute
@@ -1958,7 +1958,7 @@ typedef struct HENScanArgs {
} HENScanArgs;
static Bool
-HENQueueScanner(Display *dpy2, XEvent *ev, char *args)
+HENQueueScanner(Display *dpy2 _X_UNUSED, XEvent *ev, char *args)
{
if (ev->type == LeaveNotify) {
if (ev->xcrossing.window == ((HENScanArgs *) args)->w &&
@@ -2155,7 +2155,7 @@ typedef struct HLNScanArgs {
} HLNScanArgs;
static Bool
-HLNQueueScanner(Display *dpy2, XEvent *ev, char *args)
+HLNQueueScanner(Display *dpy2 _X_UNUSED, XEvent *ev, char *args)
{
if (ev->type == EnterNotify && ev->xcrossing.mode != NotifyGrab) {
((HLNScanArgs *) args)->enters = True;
@@ -2600,7 +2600,7 @@ InstallRootColormap(void)
static Bool
-UninstallRootColormapQScanner(Display *dpy2, XEvent *ev, char *args)
+UninstallRootColormapQScanner(Display *dpy2 _X_UNUSED, XEvent *ev, char *args)
{
if (!*args) {
if (ev->type == EnterNotify) {
diff --git a/src/menus.c b/src/menus.c
index 494cbde..37db9b1 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -1577,7 +1577,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
* in case of stupid or wicked fast servers
*/
if (ConstrainedMoveTime &&
- (eventp->xbutton.time - last_time) < ConstrainedMoveTime)
+ (eventp->xbutton.time - last_time) < (Time)ConstrainedMoveTime)
{
int width, height;
diff --git a/src/parse.c b/src/parse.c
index 33e6938..044e02c 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -276,7 +276,7 @@ static int twmStringListInput(void)
*/
void twmUnput (int c)
{
- if (overflowlen < sizeof overflowbuff) {
+ if ((size_t)overflowlen < sizeof overflowbuff) {
overflowbuff[overflowlen++] = (unsigned char) c;
} else {
twmrc_error_prefix ();
@@ -959,7 +959,7 @@ put_pixel_on_root(Pixel pixel)
&retFormat, &nPixels, &retAfter,
&retProp) == Success) {
pixelProp = (Pixel *) retProp;
- for (i = 0; i < nPixels; i++)
+ for (i = 0; (unsigned long)i < nPixels; i++)
if (pixel == pixelProp[i])
addPixel = 0;
}
diff --git a/src/session.c b/src/session.c
index 03b84a1..1531626 100644
--- a/src/session.c
+++ b/src/session.c
@@ -720,7 +720,7 @@ unique_filename (
static void
-SaveYourselfPhase2CB (SmcConn smcConn2, SmPointer clientData)
+SaveYourselfPhase2CB (SmcConn smcConn2, SmPointer clientData _X_UNUSED)
{
int scrnum;
ScreenInfo *theScreen;
@@ -899,11 +899,11 @@ SaveYourselfPhase2CB (SmcConn smcConn2, SmPointer clientData)
static void
SaveYourselfCB (
SmcConn smcConn2,
- SmPointer clientData,
- int saveType,
- Bool shutdown,
- int interactStyle,
- Bool fast)
+ SmPointer clientData _X_UNUSED,
+ int saveType _X_UNUSED,
+ Bool shutdown _X_UNUSED,
+ int interactStyle _X_UNUSED,
+ Bool fast _X_UNUSED)
{
if (!SmcRequestSaveYourselfPhase2 (smcConn2, SaveYourselfPhase2CB, NULL))
{
@@ -917,7 +917,7 @@ SaveYourselfCB (
static void
-DieCB (SmcConn smcConn2, SmPointer clientData)
+DieCB (SmcConn smcConn2, SmPointer clientData _X_UNUSED)
{
SmcCloseConnection (smcConn2, 0, NULL);
XtRemoveInput (iceInputId);
@@ -927,7 +927,7 @@ DieCB (SmcConn smcConn2, SmPointer clientData)
static void
-SaveCompleteCB (SmcConn smcConnm, SmPointer clientData)
+SaveCompleteCB (SmcConn smcConnm _X_UNUSED, SmPointer clientData _X_UNUSED)
{
;
}
@@ -935,7 +935,7 @@ SaveCompleteCB (SmcConn smcConnm, SmPointer clientData)
static void
-ShutdownCancelledCB (SmcConn smcConn2, SmPointer clientData)
+ShutdownCancelledCB (SmcConn smcConn2, SmPointer clientData _X_UNUSED)
{
if (!sent_save_done)
{
@@ -947,7 +947,7 @@ ShutdownCancelledCB (SmcConn smcConn2, SmPointer clientData)
static void
-ProcessIceMsgProc (XtPointer client_data, int *source, XtInputId *id)
+ProcessIceMsgProc (XtPointer client_data, int *source _X_UNUSED, XtInputId *id _X_UNUSED)
{
IceConn ice_conn = (IceConn) client_data;
diff --git a/src/twm.c b/src/twm.c
index ee1a3cf..204f7b1 100644
--- a/src/twm.c
+++ b/src/twm.c
@@ -587,13 +587,13 @@ main(int argc, char *argv[])
/*
* weed out icon windows
*/
- for (i = 0; i < nchildren; i++) {
+ for (i = 0; (unsigned)i < nchildren; i++) {
if (children[i]) {
XWMHints *wmhintsp = XGetWMHints (dpy, children[i]);
if (wmhintsp) {
if (wmhintsp->flags & IconWindowHint) {
- for (j = 0; j < nchildren; j++) {
+ for (j = 0; (unsigned)j < nchildren; j++) {
if (children[j] == wmhintsp->icon_window) {
children[j] = None;
break;
@@ -608,7 +608,7 @@ main(int argc, char *argv[])
/*
* map all of the non-override windows
*/
- for (i = 0; i < nchildren; i++)
+ for (i = 0; (unsigned)i < nchildren; i++)
{
if (children[i] && MappedNotOverride(children[i]))
{
@@ -856,7 +856,7 @@ RestoreWithdrawnLocation (TwmWindow *tmp)
GetGravityOffsets (tmp, &gravx, &gravy);
if (gravy < 0) xwc.y -= tmp->title_height;
- if (bw != tmp->old_bw) {
+ if (bw != (unsigned)tmp->old_bw) {
int xoff, yoff;
if (!Scr->ClientBorderWidth) {
@@ -876,7 +876,7 @@ RestoreWithdrawnLocation (TwmWindow *tmp)
}
mask = (CWX | CWY);
- if (bw != tmp->old_bw) {
+ if (bw != (unsigned)tmp->old_bw) {
xwc.border_width = tmp->old_bw;
mask |= CWBorderWidth;
}
@@ -918,7 +918,7 @@ Reborder (Time time)
}
static void
-sigHandler(int sig)
+sigHandler(int sig _X_UNUSED)
{
XtNoticeSignal(si);
}
@@ -927,7 +927,7 @@ sigHandler(int sig)
* cleanup and exit twm
*/
void
-Done(XtPointer client_data, XtSignalId *si2)
+Done(XtPointer client_data _X_UNUSED, XtSignalId *si2 _X_UNUSED)
{
if (dpy)
{
@@ -963,7 +963,7 @@ TwmErrorHandler(Display *dpy2, XErrorEvent *event)
static int
-CatchRedirectError(Display *dpy2, XErrorEvent *event)
+CatchRedirectError(Display *dpy2 _X_UNUSED, XErrorEvent *event)
{
RedirectError = TRUE;
LastErrorEvent = *event;
diff --git a/src/util.c b/src/util.c
index 13e4016..d52324a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -327,7 +327,7 @@ FindBitmap (const char *name, unsigned *widthp, unsigned *heightp)
{ TBPM_QUESTION, CreateQuestionPixmap },
};
- for (i = 0; i < (sizeof pmtab)/(sizeof pmtab[0]); i++) {
+ for (i = 0; (size_t)i < (sizeof pmtab)/(sizeof pmtab[0]); i++) {
if (XmuCompareISOLatin1 (pmtab[i].name, name) == 0)
return (*pmtab[i].proc) (widthp, heightp);
}
@@ -997,7 +997,7 @@ CreateMenuIcon (int height, unsigned *widthp, unsigned *heightp)
}
void
-Bell(int type, int percent, Window win)
+Bell(int type _X_UNUSED, int percent, Window win _X_UNUSED)
{
#ifdef XKB
XkbStdBell(dpy, win, percent, type);