From 7cd672ff5026583caf5ab445eb4b49e8620f01c7 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 14 Aug 2009 20:50:59 +0000 Subject: [PATCH] Fixed some gcc 4 warnings. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32394 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/terminal/BasicTerminalBuffer.cpp | 8 ++++---- src/apps/terminal/TermPos.h | 2 +- src/apps/terminal/TermView.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/terminal/BasicTerminalBuffer.cpp b/src/apps/terminal/BasicTerminalBuffer.cpp index 0969f1f12c..e54bc4bdc1 100644 --- a/src/apps/terminal/BasicTerminalBuffer.cpp +++ b/src/apps/terminal/BasicTerminalBuffer.cpp @@ -510,8 +510,8 @@ BasicTerminalBuffer::Find(const char* _pattern, const TermPos& start, // check word match if (matchWord) { TermPos tempPos(matchStart); - if (_PreviousChar(tempPos, c) && !c.IsSpace() - || _NextChar(tempPos = matchEnd, c) && !c.IsSpace()) { + if ((_PreviousChar(tempPos, c) && !c.IsSpace()) + || (_NextChar(tempPos = matchEnd, c) && !c.IsSpace())) { //debug_printf(" but no word match!\n"); continue; } @@ -1079,8 +1079,8 @@ BasicTerminalBuffer::_ResizeRewrap(int32 width, int32 height, if (fCursor.y + historySize == sourceIndex && fCursor.x >= sourceX && (fCursor.x < sourceX + toCopy - || destLeft >= sourceLeft - && sourceX + sourceLeft <= fCursor.x)) { + || (destLeft >= sourceLeft + && sourceX + sourceLeft <= fCursor.x))) { cursor.x = destLine->length + fCursor.x - sourceX; cursor.y = destTotalLines; diff --git a/src/apps/terminal/TermPos.h b/src/apps/terminal/TermPos.h index 505d9332b9..e2bc18c6ed 100644 --- a/src/apps/terminal/TermPos.h +++ b/src/apps/terminal/TermPos.h @@ -35,7 +35,7 @@ public: inline bool operator<=(const TermPos& other) const { - return y < other.y || y == other.y && x <= other.x; + return y < other.y || (y == other.y && x <= other.x); } inline bool operator>=(const TermPos& other) const diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index 9c4cb39229..c8e7a60861 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -1341,7 +1341,7 @@ void TermView::MessageReceived(BMessage *msg) { entry_ref ref; - char *ctrl_l = "\x0c"; + const char *ctrl_l = "\x0c"; // first check for any dropped message if (msg->WasDropped()) {