# HG changeset patch # User Chris Cannam # Date 1571413227 -3600 # Fri Oct 18 16:40:27 2019 +0100 # Branch wmx # Node ID 41fdcebf01af1d4836964888ef31c1c504b07e0f # Parent a6344b652f840443eda88a38ec2f00cf5be053be Fix some compiler warnings diff --git a/Border.C b/Border.C --- a/Border.C +++ b/Border.C @@ -33,13 +33,9 @@ class BorderRectangle // must resemble XRectangle in storage { public: - BorderRectangle() { } BorderRectangle(int xx, int yy, int ww, int hh) { x = xx; y = yy; width = ww; height = hh; } - BorderRectangle(const BorderRectangle &b) { - x = b.x; y = b.y; width = b.width; height = b.height; - } XRectangle *xrectangle() { return (XRectangle *)this; } diff --git a/Client.C b/Client.C --- a/Client.C +++ b/Client.C @@ -660,25 +660,25 @@ void Client::setSticky(Boolean sticky) { m_sticky = sticky; - setNetwmProperty(Atoms::netwm_winState, WIN_STATE_STICKY, sticky); +// setNetwmProperty(Atoms::netwm_winState, WIN_STATE_STICKY, sticky); } 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; } void Client::setSkipFocus(Boolean skipFocus) { - setNetwmProperty(Atoms::netwm_winHints, WIN_HINTS_SKIP_FOCUS, skipFocus); +// setNetwmProperty(Atoms::netwm_winHints, WIN_HINTS_SKIP_FOCUS, skipFocus); m_skipFocus = skipFocus; fprintf(stderr, "Setting \"%s\" to %sskip focus\n", name(), skipFocus?"":"not "); } void Client::setFocusOnClick(Boolean focusOnClick) { - setNetwmProperty(Atoms::netwm_winHints, WIN_HINTS_FOCUS_ON_CLICK, focusOnClick); +// setNetwmProperty(Atoms::netwm_winHints, WIN_HINTS_FOCUS_ON_CLICK, focusOnClick); m_focusOnClick = focusOnClick; } @@ -1614,7 +1614,7 @@ if(!m_isFullHeight) maximise(Vertical); } else { - if(m_isFullHeight); + if(m_isFullHeight) unmaximise(Vertical); } diff --git a/Client.h b/Client.h --- a/Client.h +++ b/Client.h @@ -10,7 +10,6 @@ class EdgeRect { public: EdgeRect() : left(0), right(0), top(0), bottom(0) { } - ~EdgeRect() { } int left, right, top, bottom; }; diff --git a/Config.C b/Config.C --- a/Config.C +++ b/Config.C @@ -173,19 +173,19 @@ } if (OPTION("tabfg:")) { - strncpy(m_impl->tabfg, s, COLOR_LEN); + strncpy(m_impl->tabfg, s, COLOR_LEN-1); 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); + strncpy(m_impl->tabbg, s, COLOR_LEN-1); m_impl->tabbg[COLOR_LEN-1] = '\0'; s += strlen(m_impl->tabbg); } if (OPTION("framebg:")) { - strncpy(m_impl->framebg, s, COLOR_LEN); + strncpy(m_impl->framebg, s, COLOR_LEN-1); m_impl->framebg[COLOR_LEN-1] = '\0'; s += strlen(m_impl->framebg); } diff --git a/Session.C b/Session.C --- a/Session.C +++ b/Session.C @@ -132,8 +132,8 @@ programVal.length = strlen(m_sessionProgram); programVal.value = m_sessionProgram; - userIDVal.length = user ? 7 : strlen(user); - userIDVal.value = user ? (SmPointer)"unknown" : (SmPointer)user; + userIDVal.length = user ? strlen(user) : 7; + userIDVal.value = user ? (SmPointer)user : (SmPointer)"unknown"; restartVal[0].length = strlen(m_sessionProgram); restartVal[0].value = m_sessionProgram;