From ad79ace7ad263bb235a360efa3596e52d4a96d32 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 9 Oct 2008 23:32:00 +0000 Subject: Bug #2056209 avoiding hidden variable warnings with Sun Studio. --- gtk/PlatGTK.cxx | 42 +++++++++++++++++++++--------------------- gtk/ScintillaGTK.cxx | 6 +++--- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 725c35cae..81c0b2195 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1071,22 +1071,22 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated guint32 valOutline = *(reinterpret_cast(pixVal)); guint32 *pixels = reinterpret_cast(gdk_pixbuf_get_pixels(pixalpha)); int stride = gdk_pixbuf_get_rowstride(pixalpha) / 4; - for (int y=0; ypfd) { char *utfForm = 0; @@ -1271,7 +1271,7 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char } pango_layout_set_font_description(layout, PFont(font_)->pfd); PangoLayoutLine *pll = pango_layout_get_line(layout,0); - gdk_draw_layout_line(drawable, gc, x, ybase, pll); + gdk_draw_layout_line(drawable, gc, xText, ybase, pll); if (useGFree) { g_free(utfForm); } else { @@ -1302,13 +1302,13 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char draw8bit = false; wctext[wclen] = L'\0'; GdkWChar *wcp = wctext; - while ((wclen > 0) && (x < maxCoordinate)) { + while ((wclen > 0) && (xText < maxCoordinate)) { int lenDraw = Platform::Minimum(wclen, segmentLength); gdk_draw_text_wc(drawable, PFont(font_)->pfont, gc, - x, ybase, wcp, lenDraw); + xText, ybase, wcp, lenDraw); wclen -= lenDraw; if (wclen > 0) { // Avoid next calculation if possible as may be expensive - x += gdk_text_width_wc(PFont(font_)->pfont, + xText += gdk_text_width_wc(PFont(font_)->pfont, wcp, lenDraw); } wcp += lenDraw; @@ -1316,13 +1316,13 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char } } if (draw8bit) { - while ((len > 0) && (x < maxCoordinate)) { + while ((len > 0) && (xText < maxCoordinate)) { int lenDraw = Platform::Minimum(len, segmentLength); gdk_draw_text(drawable, PFont(font_)->pfont, gc, - x, ybase, s, lenDraw); + xText, ybase, s, lenDraw); len -= lenDraw; if (len > 0) { // Avoid next calculation if possible as may be expensive - x += gdk_text_width(PFont(font_)->pfont, s, lenDraw); + xText += gdk_text_width(PFont(font_)->pfont, s, lenDraw); } s += lenDraw; } @@ -1985,7 +1985,7 @@ public: doubleClickAction = action; doubleClickActionData = data; } - virtual void SetList(const char* list, char separator, char typesep); + virtual void SetList(const char *listText, char separator, char typesep); }; ListBox *ListBox::Allocate() { @@ -2490,12 +2490,12 @@ void ListBoxX::ClearRegisteredImages() { xset.Clear(); } -void ListBoxX::SetList(const char* list, char separator, char typesep) { +void ListBoxX::SetList(const char *listText, char separator, char typesep) { Clear(); - int count = strlen(list) + 1; + int count = strlen(listText) + 1; char *words = new char[count]; if (words) { - memcpy(words, list, count); + memcpy(words, listText, count); char *startword = words; char *numword = NULL; int i = 0; diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index cabc1f3f3..0dd0ec9d5 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1406,10 +1406,10 @@ void ScintillaGTK::ClaimSelection() { void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText) { char *data = reinterpret_cast(selectionData->data); int len = selectionData->length; - GdkAtom selectionType = selectionData->type; + GdkAtom selectionTypeData = selectionData->type; // Return empty string if selection is not a string - if ((selectionType != GDK_TARGET_STRING) && (selectionType != atomUTF8)) { + if ((selectionTypeData != GDK_TARGET_STRING) && (selectionTypeData != atomUTF8)) { char *empty = new char[1]; empty[0] = '\0'; selText.Set(empty, 0, SC_CP_UTF8, 0, false, false); @@ -1425,7 +1425,7 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio #endif char *dest; - if (selectionType == GDK_TARGET_STRING) { + if (selectionTypeData == GDK_TARGET_STRING) { dest = Document::TransformLineEnds(&len, data, len, pdoc->eolMode); if (IsUnicodeMode()) { // Unknown encoding so assume in Latin1 -- cgit v1.2.3