summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_File_Chooser2.cxx1
-rw-r--r--src/filename_absolute.cxx6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index aa8bf6a58..51ac31271 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -160,6 +160,7 @@ Fl_File_Chooser::directory(const char *d)// I - Directory to change to
#ifdef WIN32
// See if the filename contains backslashes...
+ char *slash; // Pointer to slashes
char fixpath[1024]; // Path with slashes converted
if (strchr(d, '\\')) {
// Convert backslashes to slashes...
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx
index 6ffc6df39..abec59127 100644
--- a/src/filename_absolute.cxx
+++ b/src/filename_absolute.cxx
@@ -112,7 +112,7 @@ int // O - 0 if no change, 1 if changed
fl_filename_relative(char *to, // O - Relative filename
int tolen, // I - Size of "to" buffer
const char *from) {// I - Absolute filename
- const char *newslash; // Directory separator
+ char *newslash; // Directory separator
const char *slash; // Directory separator
char cwd[1024]; // Current directory
@@ -134,8 +134,8 @@ fl_filename_relative(char *to, // O - Relative filename
}
#if defined(WIN32) || defined(__EMX__)
- for (slash = strchr(cwd, '\\'); slash; slash = strchr(slash + 1, '\\'))
- *slash = '/';
+ for (newslash = strchr(cwd, '\\'); newslash; newslash = strchr(newslash + 1, '\\'))
+ *newslash = '/';
if (!strcasecmp(from, cwd)) {
strlcpy(to, ".", tolen);