diff options
author | nyamatongwe <unknown> | 2000-04-01 02:01:28 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2000-04-01 02:01:28 +0000 |
commit | 0e6e05226f69f7bdd5fe4415a43be5be882b414c (patch) | |
tree | a4a8d14a669ffe05bef03dc47f76262bc25b2e41 | |
parent | c7b2ff7108860ebc5c8bd56f435ca31b3b4c4065 (diff) | |
download | scintilla-mirror-0e6e05226f69f7bdd5fe4415a43be5be882b414c.tar.gz |
Fixed warnings from Borland compiler.
-rw-r--r-- | src/CellBuffer.cxx | 3 | ||||
-rw-r--r-- | src/ContractionState.cxx | 1 | ||||
-rw-r--r-- | src/Editor.cxx | 4 | ||||
-rw-r--r-- | src/Editor.h | 2 | ||||
-rw-r--r-- | src/LexPython.cxx | 3 | ||||
-rw-r--r-- | src/LexSQL.cxx | 4 | ||||
-rw-r--r-- | src/PropSet.cxx | 2 |
7 files changed, 6 insertions, 13 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 56a4be78c..1b1320667 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -233,9 +233,8 @@ int LineVector::LineFromPosition(int pos) { return lines - 1; int lower = 0; int upper = lines; - int middle = 0; do { - middle = (upper + lower + 1) / 2; // Round high + int middle = (upper + lower + 1) / 2; // Round high if (pos < linesData[middle].startPosition) { upper = middle - 1; } else { diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx index 816d06aae..aedd1c3ec 100644 --- a/src/ContractionState.cxx +++ b/src/ContractionState.cxx @@ -30,7 +30,6 @@ void ContractionState::MakeValid() const { if (!valid) { // Could be cleverer by keeping the index of the last still valid entry // rather than invalidating all. - int linePrev = -1; int lineDisplay = 0; for (int line=0; line<linesInDoc; line++) { lines[line].displayLine = lineDisplay; diff --git a/src/Editor.cxx b/src/Editor.cxx index e06bd496d..983568ec2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -652,11 +652,10 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { sprintf(number, "%d", line + 1); if (foldFlags & 64) sprintf(number, "%X", pdoc->GetLevel(line)); - int xpos = 0; PRectangle rcNumber=rcMarker; // Right justify int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, strlen(number)); - xpos = rcNumber.right - width - 3; + int xpos = rcNumber.right - width - 3; rcNumber.left = xpos; if ((visibleLine < cs.LinesDisplayed()) && cs.GetVisible(line)) { surface->DrawText(rcNumber, vs.styles[STYLE_LINENUMBER].font, @@ -3608,7 +3607,6 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) { case SCI_SEARCHNEXT: case SCI_SEARCHPREV: return SearchText(iMessage, wParam, lParam); - break; case SCI_SETCARETPOLICY: caretPolicy = wParam; diff --git a/src/Editor.h b/src/Editor.h index d1281be5a..205baa880 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -67,7 +67,7 @@ protected: // ScintillaBase subclass needs access to much of Editor Surface pixmapSelPattern; // Intellimouse support - currently only implemented for Windows unsigned int ucWheelScrollLines; - short cWheelDelta; //wheel delta from roll + int cWheelDelta; //wheel delta from roll KeyMap kmap; diff --git a/src/LexPython.cxx b/src/LexPython.cxx index acce39a4a..d7830b0b7 100644 --- a/src/LexPython.cxx +++ b/src/LexPython.cxx @@ -65,7 +65,6 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, char chPrev = ' '; char chPrev2 = ' '; char chNext = styler[startPos]; - char chNext2 = styler[startPos]; styler.StartSegment(startPos); int lengthDoc = startPos + length; bool atStartLine = true; @@ -86,7 +85,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); - chNext2 = styler.SafeGetCharAt(i + 2); + char chNext2 = styler.SafeGetCharAt(i + 2); if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) { if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) { diff --git a/src/LexSQL.cxx b/src/LexSQL.cxx index 0f5ca5614..900f8ddc2 100644 --- a/src/LexSQL.cxx +++ b/src/LexSQL.cxx @@ -44,20 +44,18 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, bool fold = styler.GetPropSet().GetInt("fold"); int lineCurrent = styler.GetLine(startPos); int spaceFlags = 0; - int indentCurrent = 0; int state = initStyle; char chPrev = ' '; char chNext = styler[startPos]; styler.StartSegment(startPos); unsigned int lengthDoc = startPos + length; - bool prevCr = false; for (unsigned int i = startPos; i <= lengthDoc; i++) { char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags); + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags); int lev = indentCurrent; if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { // Only non whitespace lines can be headers diff --git a/src/PropSet.cxx b/src/PropSet.cxx index 8582105ea..101b7f563 100644 --- a/src/PropSet.cxx +++ b/src/PropSet.cxx @@ -39,7 +39,7 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) { fpc++; lenData--; } - *s++ = '\0'; + *s = '\0'; return true; } } else if ((ch == '\\') && (lenData > 0) && ((*fpc == '\r') || (*fpc == '\n'))) { |