summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-09-21 20:22:51 (GMT)
committernijtmans <nijtmans>2010-09-21 20:22:51 (GMT)
commit88fbbfe8f3b7b4523c1af2c879ddc4b0be6c6c3b (patch)
tree2fbbbc375c74f250bdda260566ecf6cdfc636408 /win/tclWinFile.c
parentd24e3a2febe9142596afe7c394f7bbc27b193eb6 (diff)
downloadtcl-88fbbfe8f3b7b4523c1af2c879ddc4b0be6c6c3b.zip
tcl-88fbbfe8f3b7b4523c1af2c879ddc4b0be6c6c3b.tar.gz
tcl-88fbbfe8f3b7b4523c1af2c879ddc4b0be6c6c3b.tar.bz2
Fix declaration after statement.
Add -Wdeclaration-after-statement, so this mistake cannot happen again.
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c5
1 files changed, 3 insertions, 2 deletions
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;