summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-11-23 15:50:54 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2019-11-23 15:50:54 -0500
commit35f696e8c51b3fa6b8f6f2e8baa038ae8f77bc2d (patch)
treee74f606c8b156b236abfcf5ea2fd9364fca96530
parentfc3c537836adbe209ab98e08b345874f522027cc (diff)
strict gcc-warning fixes, no object-change
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--src/add_window.c29
-rw-r--r--src/icons.c8
2 files changed, 22 insertions, 15 deletions
diff --git a/src/add_window.c b/src/add_window.c
index 44e1bed..154a369 100644
--- a/src/add_window.c
+++ b/src/add_window.c
@@ -72,6 +72,8 @@ in this Software without prior written authorization from The Open Group.
#include "session.h"
#include "add_window.h"
+#define short_lookup (short)(long)(void*)
+
#define gray_width 2
#define gray_height 2
static char gray_bits[] = {
@@ -271,31 +273,31 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
namelen = (int) strlen(tmp_win->name);
tmp_win->highlight = Scr->Highlight &&
- (!(short) (long) LookInList(Scr->NoHighlight, tmp_win->full_name,
- &tmp_win->class));
+ (!short_lookup LookInList(Scr->NoHighlight, tmp_win->full_name,
+ &tmp_win->class));
tmp_win->stackmode = Scr->StackMode &&
- (!(short) (long) LookInList(Scr->NoStackModeL, tmp_win->full_name,
- &tmp_win->class));
+ (!short_lookup LookInList(Scr->NoStackModeL, tmp_win->full_name,
+ &tmp_win->class));
tmp_win->titlehighlight = Scr->TitleHighlight &&
- (!(short) (long) LookInList(Scr->NoTitleHighlight, tmp_win->full_name,
- &tmp_win->class));
+ (!short_lookup LookInList(Scr->NoTitleHighlight, tmp_win->full_name,
+ &tmp_win->class));
- tmp_win->auto_raise = (short) (long) LookInList(Scr->AutoRaise,
- tmp_win->full_name,
- &tmp_win->class);
+ tmp_win->auto_raise = short_lookup LookInList(Scr->AutoRaise,
+ tmp_win->full_name,
+ &tmp_win->class);
if (tmp_win->auto_raise)
Scr->NumAutoRaises++;
tmp_win->iconify_by_unmapping = Scr->IconifyByUnmapping;
if (Scr->IconifyByUnmapping) {
tmp_win->iconify_by_unmapping = iconm ? FALSE :
- !(short) (long) LookInList(Scr->DontIconify, tmp_win->full_name,
- &tmp_win->class);
+ !short_lookup LookInList(Scr->DontIconify, tmp_win->full_name,
+ &tmp_win->class);
}
tmp_win->iconify_by_unmapping |=
- (short) (long) LookInList(Scr->IconifyByUn, tmp_win->full_name,
- &tmp_win->class);
+ short_lookup LookInList(Scr->IconifyByUn, tmp_win->full_name,
+ &tmp_win->class);
if (LookInList(Scr->WindowRingL, tmp_win->full_name, &tmp_win->class)) {
if (Scr->Ring) {
@@ -1049,6 +1051,7 @@ GrabKeys(TwmWindow *tmp_win)
if (tmp_win->icon_w)
XGrabKey(dpy, tmp->keycode, (unsigned) tmp->mods,
tmp_win->icon_w, True, GrabModeAsync, GrabModeAsync);
+ /* FALLTHRU */
case C_TITLE:
if (tmp_win->title_w)
diff --git a/src/icons.c b/src/icons.c
index 308ae9f..a437963 100644
--- a/src/icons.c
+++ b/src/icons.c
@@ -366,7 +366,9 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
bm = None;
if (icon_name != NULL) {
- if ((bm = (Pixmap) LookInNameList(Scr->Icons, icon_name)) == None) {
+ if ((bm =
+ (Pixmap) (void *) LookInNameList(Scr->Icons,
+ icon_name)) == None) {
if ((bm = GetBitmap(icon_name)) != None)
AddToList(&Scr->Icons, icon_name, (char *) bm);
}
@@ -428,7 +430,9 @@ CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
bm = None;
if (icon_name != NULL) {
- if ((bm = (Pixmap) LookInNameList(Scr->Icons, icon_name)) == None) {
+ if ((bm =
+ (Pixmap) (void *) LookInNameList(Scr->Icons,
+ icon_name)) == None) {
if ((bm = GetBitmap(icon_name)) != None)
AddToList(&Scr->Icons, icon_name, (char *) bm);
}