Author: AlbrechtS
Date: 2010-12-08 04:15:48 -0800 (Wed, 08 Dec 2010)
New Revision: 7975
Log:
Fixed some compiler warnings, most of them in Windows-specific code.
Modified:
branches/branch-1.3/src/Fl_File_Chooser2.cxx
branches/branch-1.3/src/Fl_Text_Display.cxx
branches/branch-1.3/src/fl_font_win32.cxx
branches/branch-1.3/src/fl_utf8.cxx
Modified: branches/branch-1.3/src/Fl_File_Chooser2.cxx
===================================================================
--- branches/branch-1.3/src/Fl_File_Chooser2.cxx 2010-12-08 11:42:47 UTC
(rev 7974)
+++ branches/branch-1.3/src/Fl_File_Chooser2.cxx 2010-12-08 12:15:48 UTC
(rev 7975)
@@ -842,8 +842,8 @@
// 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_)) {
Modified: branches/branch-1.3/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Text_Display.cxx 2010-12-08 11:42:47 UTC (rev
7974)
+++ branches/branch-1.3/src/Fl_Text_Display.cxx 2010-12-08 12:15:48 UTC (rev
7975)
@@ -1417,7 +1417,7 @@
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)
Modified: branches/branch-1.3/src/fl_font_win32.cxx
===================================================================
--- branches/branch-1.3/src/fl_font_win32.cxx 2010-12-08 11:42:47 UTC (rev
7974)
+++ branches/branch-1.3/src/fl_font_win32.cxx 2010-12-08 12:15:48 UTC (rev
7975)
@@ -347,7 +347,7 @@
// 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 {
Modified: branches/branch-1.3/src/fl_utf8.cxx
===================================================================
--- branches/branch-1.3/src/fl_utf8.cxx 2010-12-08 11:42:47 UTC (rev 7974)
+++ branches/branch-1.3/src/fl_utf8.cxx 2010-12-08 12:15:48 UTC (rev 7975)
@@ -420,9 +420,10 @@
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 @@
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;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit