summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rwxr-xr-xwin/configure2
-rw-r--r--win/tcl.m42
-rw-r--r--win/tclWinFile.c5
4 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 700f8f1..b340355 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-21 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/tclWinFile.c: Fix declaration after statement.
+ * win/tcl.m4: Add -Wdeclaration-after-statement, so
+ * win/configure: this mistake cannot happen again.
+
2010-09-20 Jan Nijtmans <nijtmans@users.sf.net>
* win/tclWinFCmd.c: Eliminate tclWinProcs->useWide everywhere, since
diff --git a/win/configure b/win/configure
index 6715c57..fefa99b 100755
--- a/win/configure
+++ b/win/configure
@@ -3985,7 +3985,7 @@ echo "$as_me: error: ${CC} does not support the -shared option.
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall"
+ CFLAGS_WARNING="-Wall -Wdeclaration-after-statement"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
diff --git a/win/tcl.m4 b/win/tcl.m4
index ecaad78..1ad10ae 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -535,7 +535,7 @@ file for information about building with Mingw.])
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall"
+ CFLAGS_WARNING="-Wall -Wdeclaration-after-statement"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 98c9fc2..0bdcbd8 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.112 2010/09/20 14:28:13 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.113 2010/09/21 20:22:51 nijtmans Exp $
*/
#include "tclWinInt.h"
@@ -1885,6 +1885,7 @@ TclpGetCwd(
{
TCHAR buffer[MAX_PATH];
char *p;
+ WCHAR *native;
if (tclWinProcs->getCurrentDirectoryProc(MAX_PATH, buffer) == 0) {
TclWinConvertError(GetLastError());
@@ -1899,7 +1900,7 @@ TclpGetCwd(
* Watch for the weird Windows c:\\UNC syntax.
*/
- WCHAR *native = (WCHAR *) buffer;
+ native = (WCHAR *) buffer;
if ((native[0] != '\0') && (native[1] == ':')
&& (native[2] == '\\') && (native[3] == '\\')) {
native += 2;