fix compiler warnings in fbrun too

This commit is contained in:
simonb 2006-04-17 08:04:12 +00:00
parent 29f975b302
commit 78f3b0ada4
2 changed files with 7 additions and 4 deletions

View file

@ -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

View file

@ -145,7 +145,7 @@ void FbRun::run(const std::string &command) {
// 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 @@ void FbRun::tabCompleteHistory() {
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);