Author: bgbnbigben
Date: 2011-03-02 04:22:15 -0800 (Wed, 02 Mar 2011)
New Revision: 8497
Log:
Cleaned up more warnings - unused variables and signed/unsigned comparisons in 
the native file_chooser()

Modified:
   trunk/src/file_chooser.cxx

Modified: trunk/src/file_chooser.cxx
===================================================================
--- trunk/src/file_chooser.cxx  2011-03-02 12:19:37 UTC (rev 8496)
+++ trunk/src/file_chooser.cxx  2011-03-02 12:22:15 UTC (rev 8497)
@@ -196,10 +196,11 @@
     
     if (fnameW) {
       memset(filenamebuffer, 0, MAX_PATH);
-      if((filenamebuffer[1] == ':') && (_getdrive() + 'A' - 1 == 
filenamebuffer[0]))
+      // BS: Commented this out, as the memset() seems to render it redundant
+      /*if((filenamebuffer[1] == ':') && (_getdrive() + 'A' - 1 == 
filenamebuffer[0]))
        wcsncpy(filenamebuffer, fnameW + 2, MAX_PATH);
-      else
-       wcsncat(filenamebuffer, fnameW, MAX_PATH);
+      else*/
+      wcsncat(filenamebuffer, fnameW, MAX_PATH);
     }
     wreq.lpstrFile = filenamebuffer;
     GetCurrentDirectoryW(MAX_PATH, currentDirBuffer);
@@ -210,7 +211,7 @@
       char temp[PATH_MAX], dir[PATH_MAX];
       memset(temp, 0, PATH_MAX); memset(dir, 0, PATH_MAX);
       ret[0] = 0;
-      int count = utf8fromwc(temp, PATH_MAX, wreq.lpstrFile, 
windowsWLen(wreq.lpstrFile)+1);
+      utf8fromwc(temp, PATH_MAX, wreq.lpstrFile, 
windowsWLen(wreq.lpstrFile)+1);
       sprintf(dir, "%s\\", temp);
       for (char *s = temp + strlen(temp) + 1; s && *s; s += strlen(s) + 1) {
        sprintf(ret + strlen(ret), "%s%s\n", dir, s);

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to