diff options
author | simonb <simonb> | 2006-04-17 08:04:12 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-17 08:04:12 (GMT) |
commit | 78f3b0ada415296434dd0474b3f1dd305f35e383 (patch) | |
tree | b7f630d1baeea06800ad465e4f5040731a7efcc0 | |
parent | 29f975b302c1cc4ab758871811894dfe572a4f24 (diff) | |
download | fluxbox_paul-78f3b0ada415296434dd0474b3f1dd305f35e383.zip fluxbox_paul-78f3b0ada415296434dd0474b3f1dd305f35e383.tar.bz2 |
fix compiler warnings in fbrun too
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | util/fbrun/FbRun.cc | 8 |
2 files changed, 7 insertions, 4 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.16: | 2 | Changes for 0.9.16: |
3 | *06/04/17: | ||
4 | * patchset missed my fbrun -Wall fixes (Simon) | ||
5 | util/fbrun/FbRun.cc | ||
3 | *06/04/16: | 6 | *06/04/16: |
4 | * Add option to reverse desktop wheeling, patch #1034287 | 7 | * Add option to reverse desktop wheeling, patch #1034287 |
5 | session.screen0.reversewheeling: true|false | 8 | session.screen0.reversewheeling: true|false |
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc index 385f2b1..281b35f 100644 --- a/util/fbrun/FbRun.cc +++ b/util/fbrun/FbRun.cc | |||
@@ -145,7 +145,7 @@ void FbRun::run(const std::string &command) { | |||
145 | // now m_current_history_item points at the duplicate, or | 145 | // now m_current_history_item points at the duplicate, or |
146 | // at m_history.size() if no duplicate | 146 | // at m_history.size() if no duplicate |
147 | if (m_current_history_item != m_history.size()) { | 147 | if (m_current_history_item != m_history.size()) { |
148 | int i = 0; | 148 | unsigned int i = 0; |
149 | // read past history items before current | 149 | // read past history items before current |
150 | for (; inoutfile.good() && i < m_current_history_item; i++) | 150 | for (; inoutfile.good() && i < m_current_history_item; i++) |
151 | inoutfile.ignore(1, '\n'); | 151 | inoutfile.ignore(1, '\n'); |
@@ -342,16 +342,16 @@ void FbRun::tabCompleteHistory() { | |||
342 | XBell(m_display, 0); | 342 | XBell(m_display, 0); |
343 | } else { | 343 | } else { |
344 | unsigned int nr= 0; | 344 | unsigned int nr= 0; |
345 | int history_item = m_current_history_item - 1; | 345 | unsigned int history_item = m_current_history_item - 1; |
346 | string prefix = text().substr(0, textStartPos() + cursorPosition()); | 346 | string prefix = text().substr(0, textStartPos() + cursorPosition()); |
347 | while (history_item != m_current_history_item && nr++ < m_history.size()) { | 347 | while (history_item != m_current_history_item && nr++ < m_history.size()) { |
348 | if (history_item <= -1 ) | ||
349 | history_item= m_history.size() - 1; | ||
350 | if (m_history[history_item].find(prefix) == 0) { | 348 | if (m_history[history_item].find(prefix) == 0) { |
351 | m_current_history_item = history_item; | 349 | m_current_history_item = history_item; |
352 | setText(m_history[m_current_history_item]); | 350 | setText(m_history[m_current_history_item]); |
353 | break; | 351 | break; |
354 | } | 352 | } |
353 | if (history_item == 0) // loop | ||
354 | history_item = m_history.size(); | ||
355 | history_item--; | 355 | history_item--; |
356 | } | 356 | } |
357 | if (history_item == m_current_history_item) XBell(m_display, 0); | 357 | if (history_item == m_current_history_item) XBell(m_display, 0); |