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
This commit is contained in:
Albrecht Schlosser
2010-12-08 12:15:48 +00:00
parent 3105ab9de5
commit f90c190a8e
4 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -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_)) {
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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 {
+4 -2
View File
@@ -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;