# HG changeset patch # User Chris Cannam # Date 1400868980 -3600 # Fri May 23 19:16:20 2014 +0100 # Branch wmx # Node ID d5610dbe199ce61a394863562a97d8c05a819746 # Parent 6e52aa293ca29d5488d8487f4da2080cd0c06b82 Fix some compiler warnings diff --git a/Client.C b/Client.C --- a/Client.C +++ b/Client.C @@ -665,7 +665,7 @@ void Client::setMovable(Boolean movable) { - setNetwmProperty(Atoms::netwm_winState, WIN_STATE_FIXED_POSITION, !movable); + setNetwmProperty(Atoms::netwm_winState, WIN_STATE_FIXED_POSITION, !movable); m_movable = movable; } diff --git a/Config.C b/Config.C --- a/Config.C +++ b/Config.C @@ -125,55 +125,65 @@ do { fprintf(stderr, ">%s< ",s); - if (OPTION("menu:")) + if (OPTION("menu:")) { if (OPTION("full")) m_impl->menu = 1; else if (OPTION("part")) m_impl->menu = 0; + } - if (OPTION("new:")) + if (OPTION("new:")) { if (OPTION("on")) m_impl->disable = 0; else if (OPTION("off")) m_impl->disable = 1; + } - if (OPTION("keyboard:")) + if (OPTION("keyboard:")) { if (OPTION("on")) m_impl->kbd = 1; else if (OPTION("off")) m_impl->kbd = 0; + } - if (OPTION("feedback:")) + if (OPTION("feedback:")) { if (OPTION("on")) { m_impl->feedback = 1; if (OPTION(",")) m_impl->feeddelay = strtol(s, &s, 10); } else if (OPTION("off")) m_impl->feedback = 0; + } - if (OPTION("passclick:")) + if (OPTION("passclick:")) { if (OPTION("on")) m_impl->passfocusclick = 1; else if (OPTION("off")) m_impl->passfocusclick = 0; + } - if (OPTION("focus:")) + if (OPTION("focus:")) { if (OPTION("click")) m_impl->focus = 3; else if (OPTION("raise")) m_impl->focus = 2; else if (OPTION("delay-raise")) { m_impl->focus = 4; if (OPTION(",")) m_impl->raisedelay = strtol(s, &s, 10); } else if (OPTION("follow")) m_impl->focus = 0; + } - if (OPTION("right:")) + if (OPTION("right:")) { if (OPTION("off")) m_impl->rightBt = 0; else if (OPTION("circulate")) m_impl->rightBt = 1; else if (OPTION("lower")) m_impl->rightBt = 2; else if (OPTION("toggleheight")) m_impl->rightBt = 4; + } - if (OPTION("tabmargin:")) + if (OPTION("tabmargin:")) { m_impl->tabmargin = strtol(s, &s, 10); + } if (OPTION("tabfg:")) { strncpy(m_impl->tabfg, s, COLOR_LEN); m_impl->tabfg[COLOR_LEN-1] = '\0'; // prevent unterminated string s += strlen(m_impl->tabfg); // avoid error message below } + if (OPTION("tabbg:")) { strncpy(m_impl->tabbg, s, COLOR_LEN); m_impl->tabbg[COLOR_LEN-1] = '\0'; s += strlen(m_impl->tabbg); } + if (OPTION("framebg:")) { strncpy(m_impl->framebg, s, COLOR_LEN); m_impl->framebg[COLOR_LEN-1] = '\0'; diff --git a/Manager.C b/Manager.C --- a/Manager.C +++ b/Manager.C @@ -84,7 +84,7 @@ char *home = getenv("HOME"); char *wmxdir = getenv("WMXDIR"); - fprintf(stderr, "\nwmx: Copyright (c) 1996-2008 Chris Cannam." + fprintf(stderr, "\nwmx: Copyright (c) 1996-2014 Chris Cannam." " Not a release\n" " Parts derived from 9wm Copyright (c) 1994-96 David Hogan\n" " Command menu code Copyright (c) 1997 Jeremy Fitzhardinge\n" @@ -1267,7 +1267,7 @@ // set the names of the channels names = new char*[chan]; - for (i = 0; i < chan; i++) { + for (i = 0; i < (int)chan; i++) { snprintf(s, sizeof(s), "Channel %i", i + 1); names[i] = new char [strlen(s) + 1]; strcpy(names[i], s); @@ -1281,7 +1281,7 @@ XFree(textProp.value); } - for (i = 0; i < chan; i++) delete[] names[i]; + for (i = 0; i < (int)chan; i++) delete[] names[i]; delete[] names;