Author: AlbrechtS
Date: 2010-12-08 05:16:27 -0800 (Wed, 08 Dec 2010)
New Revision: 7977
Log:
Fixed more Windows compiler warnings:
- unused functions: dnullprint, strapp
- format mismatch for newer compilers and/or 64-bit mode
Modified:
branches/branch-1.3/src/Fl_Native_File_Chooser_WIN32.cxx
branches/branch-1.3/src/Fl_Native_File_Chooser_common.cxx
Modified: branches/branch-1.3/src/Fl_Native_File_Chooser_WIN32.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Native_File_Chooser_WIN32.cxx 2010-12-08
12:42:45 UTC (rev 7976)
+++ branches/branch-1.3/src/Fl_Native_File_Chooser_WIN32.cxx 2010-12-08
13:16:27 UTC (rev 7977)
@@ -50,6 +50,7 @@
void fl_OleInitialize(); // in Fl.cxx (Windows only)
// STATIC: PRINT WINDOWS 'DOUBLE NULL' STRING (DEBUG)
+#ifdef DEBUG
static void dnullprint(char *wp) {
if ( ! wp ) return;
for ( int t=0; true; t++ ) {
@@ -64,6 +65,7 @@
}
}
}
+#endif
// RETURN LENGTH OF DOUBLENULL STRING
// Includes single nulls in count, excludes trailing doublenull.
@@ -633,9 +635,9 @@
// No name? Make one..
char name[1024];
if ( !name_in || name_in[0] == '\0' ) {
- sprintf(name, "%.*s Files", sizeof(name)-10, winfilter);
+ sprintf(name, "%.*s Files", int(sizeof(name)-10), winfilter);
} else {
- sprintf(name, "%.*s", sizeof(name)-10, name_in);
+ sprintf(name, "%.*s", int(sizeof(name)-10), name_in);
}
dnullcat(_parsedfilt, name);
dnullcat(_parsedfilt, winfilter);
Modified: branches/branch-1.3/src/Fl_Native_File_Chooser_common.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Native_File_Chooser_common.cxx 2010-12-08
12:42:45 UTC (rev 7976)
+++ branches/branch-1.3/src/Fl_Native_File_Chooser_common.cxx 2010-12-08
13:16:27 UTC (rev 7977)
@@ -56,6 +56,7 @@
// char *s = strnew("foo"); // s = "foo"
// s = strapp(s, "bar"); // s = "foobar"
//
+#if !defined(WIN32)
static char *strapp(char *s, const char *val) {
if ( ! val ) {
return(s); // Nothing to append? return s
@@ -69,6 +70,7 @@
delete [] s; // delete old string
return(news); // return new copy
}
+#endif
// APPEND A CHARACTER TO A STRING
// This does NOT allocate space for the new character.
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit