all repos — fluxbox @ 78f3b0ada415296434dd0474b3f1dd305f35e383

custom fork of the fluxbox windowmanager

fix compiler warnings in fbrun too
simonb simonb
commit

78f3b0ada415296434dd0474b3f1dd305f35e383

parent

29f975b302c1cc4ab758871811894dfe572a4f24

2 files changed, 7 insertions(+), 4 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.16: +*06/04/17: + * patchset missed my fbrun -Wall fixes (Simon) + util/fbrun/FbRun.cc *06/04/16: * Add option to reverse desktop wheeling, patch #1034287 session.screen0.reversewheeling: true|false
M util/fbrun/FbRun.ccutil/fbrun/FbRun.cc

@@ -145,7 +145,7 @@ if (inoutfile) {

// now m_current_history_item points at the duplicate, or // at m_history.size() if no duplicate if (m_current_history_item != m_history.size()) { - int i = 0; + unsigned int i = 0; // read past history items before current for (; inoutfile.good() && i < m_current_history_item; i++) inoutfile.ignore(1, '\n');

@@ -342,16 +342,16 @@ if (m_current_history_item == 0 || m_history.empty() ) {

XBell(m_display, 0); } else { unsigned int nr= 0; - int history_item = m_current_history_item - 1; + unsigned int history_item = m_current_history_item - 1; string prefix = text().substr(0, textStartPos() + cursorPosition()); while (history_item != m_current_history_item && nr++ < m_history.size()) { - if (history_item <= -1 ) - history_item= m_history.size() - 1; if (m_history[history_item].find(prefix) == 0) { m_current_history_item = history_item; setText(m_history[m_current_history_item]); break; } + if (history_item == 0) // loop + history_item = m_history.size(); history_item--; } if (history_item == m_current_history_item) XBell(m_display, 0);