summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2021-08-30 14:16:49 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-08-30 14:16:49 +0200
commitdc13b569150359005a9bf343aef56eeda12094a1 (patch)
treebf7ffa04c7bad1ecbf0217fd986c3d0b5da951e4
parent2ce8183beed0ef5768c44e992e2790f1c3e15787 (diff)
Fix compiler warnings (Windows only)
src/Fl_Native_File_Chooser_WIN32.cxx:331:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 331 | while ( s=strchr(s,'\\') ) *s = '/'; | ~^~~~~~~~~~~~~~~ src/Fl_Native_File_Chooser_WIN32.cxx:336:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 336 | while ( s=strchr(s,'/') ) *s = '\\'; | ~^~~~~~~~~~~~~~
-rw-r--r--src/Fl_Native_File_Chooser_WIN32.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Native_File_Chooser_WIN32.cxx b/src/Fl_Native_File_Chooser_WIN32.cxx
index 1046e9260..71d98f04c 100644
--- a/src/Fl_Native_File_Chooser_WIN32.cxx
+++ b/src/Fl_Native_File_Chooser_WIN32.cxx
@@ -328,12 +328,12 @@ void Fl_WinAPI_Native_File_Chooser_Driver::ClearBINF() {
// CONVERT WINDOWS BACKSLASHES TO UNIX FRONTSLASHES
void Fl_WinAPI_Native_File_Chooser_Driver::Win2Unix(char *s) {
- while ( s=strchr(s,'\\') ) *s = '/';
+ while ( (s=strchr(s,'\\')) ) *s = '/';
}
// CONVERT UNIX FRONTSLASHES TO WINDOWS BACKSLASHES
void Fl_WinAPI_Native_File_Chooser_Driver::Unix2Win(char *s) {
- while ( s=strchr(s,'/') ) *s = '\\';
+ while ( (s=strchr(s,'/')) ) *s = '\\';
}
// SEE IF PATH IS FRONT SLASH OR BACKSLASH STYLE