diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-08-09 07:15:09 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-08-09 07:15:09 (GMT) |
commit | 7884058a52af8573e05691c2e1e40fdfa78ab5db (patch) | |
tree | 640c1704f91c3fb52f9078fab279a42dc33085ad /win/tclWinFile.c | |
parent | bc61e591021b6e5b5e4a49fe1f0111b4a475cc27 (diff) | |
parent | f0ac2a42dacd012d571e820af585805230045d01 (diff) | |
download | tcl-7884058a52af8573e05691c2e1e40fdfa78ab5db.zip tcl-7884058a52af8573e05691c2e1e40fdfa78ab5db.tar.gz tcl-7884058a52af8573e05691c2e1e40fdfa78ab5db.tar.bz2 |
[Bug 3388350] mingw64 compiler warnings
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r-- | win/tclWinFile.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index df1c25b..f0f3bb0 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -252,9 +252,7 @@ WinLink( * It is a file. */ - if (CreateHardLink == NULL) { - Tcl_SetErrno(ENOTDIR); - } else if (linkAction & TCL_CREATE_HARD_LINK) { + if (linkAction & TCL_CREATE_HARD_LINK) { if (CreateHardLink(linkSourcePath, linkTargetPath, NULL)) { /* * Success! @@ -925,24 +923,16 @@ TclpMatchInDirectory( int len; DWORD attr; + WIN32_FILE_ATTRIBUTE_DATA data; const char *str = Tcl_GetStringFromObj(norm,&len); native = Tcl_FSGetNativePath(pathPtr); - if (GetFileAttributesEx == NULL) { - attr = GetFileAttributes(native); - if (attr == INVALID_FILE_ATTRIBUTES) { - return TCL_OK; - } - } else { - WIN32_FILE_ATTRIBUTE_DATA data; - - if (GetFileAttributesEx(native, - GetFileExInfoStandard, &data) != TRUE) { - return TCL_OK; - } - attr = data.dwFileAttributes; + if (GetFileAttributesEx(native, + GetFileExInfoStandard, &data) != TRUE) { + return TCL_OK; } + attr = data.dwFileAttributes; if (NativeMatchType(WinIsDrive(str,len), attr, native, types)) { Tcl_ListObjAppendElement(interp, resultPtr, pathPtr); @@ -1023,8 +1013,7 @@ TclpMatchInDirectory( } native = Tcl_WinUtfToTChar(dirName, -1, &ds); - if (FindFirstFileEx == NULL || (types == NULL) - || (types->type != TCL_GLOB_TYPE_DIR)) { + if ((types == NULL) || (types->type != TCL_GLOB_TYPE_DIR)) { handle = FindFirstFile(native, &data); } else { /* |