aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2008-12-23 11:33:11 +0000
committernyamatongwe <unknown>2008-12-23 11:33:11 +0000
commitdd8505c0d64e2f2d42f7aeef761ca2fb42b01190 (patch)
tree2536da04441658778684c6819358ae79c7bb2b7f /src
parentf797cc6b8ca81530565c989d40ac9bc2b1952465 (diff)
downloadscintilla-mirror-dd8505c0d64e2f2d42f7aeef761ca2fb42b01190.tar.gz
Avoid warnings with gcc 4.3
Diffstat (limited to 'src')
-rw-r--r--src/Document.cxx8
-rw-r--r--src/LexOthers.cxx2
-rw-r--r--src/LexPython.cxx2
-rw-r--r--src/PositionCache.cxx4
-rw-r--r--src/RESearch.cxx5
-rw-r--r--src/UniConversion.cxx2
6 files changed, 12 insertions, 11 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 9dca92035..611da25a0 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -1059,8 +1059,8 @@ long Document::FindText(int minPos, int maxPos, const char *s,
}
if (found) {
if ((!word && !wordStart) ||
- word && IsWordAt(pos, pos + lengthFind) ||
- wordStart && IsWordStartAt(pos))
+ (word && IsWordAt(pos, pos + lengthFind)) ||
+ (wordStart && IsWordStartAt(pos)))
return pos;
}
}
@@ -1075,8 +1075,8 @@ long Document::FindText(int minPos, int maxPos, const char *s,
}
if (found) {
if ((!word && !wordStart) ||
- word && IsWordAt(pos, pos + lengthFind) ||
- wordStart && IsWordStartAt(pos))
+ (word && IsWordAt(pos, pos + lengthFind)) ||
+ (wordStart && IsWordStartAt(pos)))
return pos;
}
}
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index 24eee96a3..0db6e8f2c 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -770,7 +770,7 @@ static void FoldPropsDoc(unsigned int startPos, int length, int, WordList *[], A
lev = SC_FOLDLEVELBASE;
}
int flagsNext = styler.LevelAt(lineCurrent);
- styler.SetLevel(lineCurrent, lev | flagsNext & ~SC_FOLDLEVELNUMBERMASK);
+ styler.SetLevel(lineCurrent, lev | (flagsNext & ~SC_FOLDLEVELNUMBERMASK));
}
static void ColouriseMakeLine(
diff --git a/src/LexPython.cxx b/src/LexPython.cxx
index 01d406d0d..7cc20e80a 100644
--- a/src/LexPython.cxx
+++ b/src/LexPython.cxx
@@ -276,7 +276,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
hexadecimal = false;
}
sc.SetState(SCE_P_NUMBER);
- } else if (isascii(sc.ch) && isoperator(static_cast<char>(sc.ch)) || sc.ch == '`') {
+ } else if ((isascii(sc.ch) && isoperator(static_cast<char>(sc.ch))) || sc.ch == '`') {
sc.SetState(SCE_P_OPERATOR);
} else if (sc.ch == '#') {
sc.SetState(sc.chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE);
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index f40a15378..d9fb9a783 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -126,8 +126,8 @@ int LineLayout::LineLastVisible(int line) const {
}
bool LineLayout::InLine(int offset, int line) const {
- return ((offset >= LineStart(line)) && (offset < LineStart(line + 1)) ||
- ((offset == numCharsInLine) && (line == (lines-1))));
+ return ((offset >= LineStart(line)) && (offset < LineStart(line + 1))) ||
+ ((offset == numCharsInLine) && (line == (lines-1)));
}
void LineLayout::SetLineStart(int line, int start) {
diff --git a/src/RESearch.cxx b/src/RESearch.cxx
index 57c745e2d..6c27f1a5a 100644
--- a/src/RESearch.cxx
+++ b/src/RESearch.cxx
@@ -449,11 +449,12 @@ const char *RESearch::Compile(const char *pattern, int length, bool caseSensitiv
char mask; /* xor mask -CCL/NCL */
int c1, c2, prevChar;
- if (!pattern || !length)
+ if (!pattern || !length) {
if (sta)
return 0;
else
return badpat("No previous regular expression");
+ }
sta = NOP;
const char *p=pattern; /* pattern pointer */
@@ -875,7 +876,7 @@ int RESearch::PMatch(CharacterIndexer &ci, int lp, int endp, char *ap) {
eopat[*ap++] = lp;
break;
case BOW:
- if (lp!=bol && iswordc(ci.CharAt(lp-1)) || !iswordc(ci.CharAt(lp)))
+ if ((lp!=bol && iswordc(ci.CharAt(lp-1))) || !iswordc(ci.CharAt(lp)))
return NOTFOUND;
break;
case EOW:
diff --git a/src/UniConversion.cxx b/src/UniConversion.cxx
index 863eb82cd..7dbe9e23d 100644
--- a/src/UniConversion.cxx
+++ b/src/UniConversion.cxx
@@ -48,7 +48,7 @@ void UTF8FromUTF16(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned
i++;
unsigned int xch = 0x10000 + ((uch & 0x3ff) << 10) + (uptr[i] & 0x3ff);
putf[k++] = static_cast<char>(0xF0 | (xch >> 18));
- putf[k++] = static_cast<char>(0x80 | (xch >> 12) & 0x3f);
+ putf[k++] = static_cast<char>(0x80 | ((xch >> 12) & 0x3f));
putf[k++] = static_cast<char>(0x80 | ((xch >> 6) & 0x3f));
putf[k++] = static_cast<char>(0x80 | (xch & 0x3f));
} else {