diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2010-12-08 12:15:48 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2010-12-08 12:15:48 +0000 |
| commit | f90c190a8e42c65d26dcbf889801cfe1e42c5dab (patch) | |
| tree | 7f0360e4cd94cfc13183d43b8e9d7d42f132d530 | |
| parent | 3105ab9de50b8e0b3fb59942e867f26c16ab5a03 (diff) | |
Fixed some compiler warnings, most of them in Windows-specific code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_Text_Display.cxx | 2 | ||||
| -rw-r--r-- | src/fl_font_win32.cxx | 2 | ||||
| -rw-r--r-- | src/fl_utf8.cxx | 6 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 9d7f95148..9a81f44a9 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -842,8 +842,8 @@ Fl_File_Chooser::fileNameCB() // Enter pressed - select or change directory... #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__) if ((isalpha(pathname[0] & 255) && pathname[1] == ':' && !pathname[2]) || - _fl_filename_isdir_quick(pathname) && - compare_dirnames(pathname, directory_)) { + (_fl_filename_isdir_quick(pathname) && + compare_dirnames(pathname, directory_))) { #else if (_fl_filename_isdir_quick(pathname) && compare_dirnames(pathname, directory_)) { diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index c55a0d17c..f4dfef050 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1417,7 +1417,7 @@ void Fl_Text_Display::buffer_modified_cb( int pos, int nInserted, int nDeleted, Fl_Text_Buffer *buf = textD->mBuffer; int oldFirstChar = textD->mFirstChar; int scrolled, origCursorPos = textD->mCursorPos; - int wrapModStart, wrapModEnd; + int wrapModStart = 0, wrapModEnd = 0; IS_UTF8_ALIGNED2(buf, pos) IS_UTF8_ALIGNED2(buf, oldFirstChar) diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx index 4b7ac8b93..f1f545bb8 100644 --- a/src/fl_font_win32.cxx +++ b/src/fl_font_win32.cxx @@ -347,7 +347,7 @@ void Fl_Graphics_Driver::draw(const char* str, int n, int x, int y) { // int l = fl_utf2ucs((const unsigned char*)str + i, n - i, &u); int l; u = fl_utf8decode((const char*)(str + i), end, &l); - if (u1 = fl_nonspacing(u)) { + if ( (u1 = fl_nonspacing(u)) ) { x -= lx; u = u1; } else { diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx index ccbe98e95..da8dcfba8 100644 --- a/src/fl_utf8.cxx +++ b/src/fl_utf8.cxx @@ -420,9 +420,10 @@ static char *buf = NULL; static int buf_len = 0; static unsigned short *wbufa = NULL; +// FIXME: This should *maybe* return 'const char *' instead of 'char *' char *fl_utf8_to_locale(const char *s, int len, UINT codepage) { - if (!s) return ""; + if (!s) return (char *)""; int l = 0; // if (buf_len < len * 2 + 1) { // buf_len = len * 2 + 1; @@ -447,9 +448,10 @@ char *fl_utf8_to_locale(const char *s, int len, UINT codepage) return buf; } +// FIXME: This should maybe return 'const char *' instead of 'char *' char *fl_locale_to_utf8(const char *s, int len, UINT codepage) { - if (!s) return ""; + if (!s) return (char *)""; int l = 0; if (buf_len < len * 5 + 1) { buf_len = len * 5 + 1; |
