summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2018-06-08 12:50:43 (GMT)
committersebres <sebres@users.sourceforge.net>2018-06-08 12:50:43 (GMT)
commit04d1270786231c4481e3000d2f98d272c63e90db (patch)
tree89d08ae032fed404f7b1efa51da0eade7e7c37da /win/tclWinFile.c
parent240e6b50d2dfd9d501eeb3e180be594f51f6f03c (diff)
downloadtcl-04d1270786231c4481e3000d2f98d272c63e90db.zip
tcl-04d1270786231c4481e3000d2f98d272c63e90db.tar.gz
tcl-04d1270786231c4481e3000d2f98d272c63e90db.tar.bz2
resolves some warnings by compiling with new gcc-versions (>= 7.x):
- '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] - passing argument 1 of 'Tcl_CreateExitHandler' from incompatible pointer type [-Wincompatible-pointer-types]
Diffstat (limited to 'win/tclWinFile.c')
-rwxr-xr-xwin/tclWinFile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 3655321..1536bc0 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1394,6 +1394,12 @@ NativeMatchType(
return 1;
}
+static void
+FreeLoadLibHandle(
+ ClientData clientData)
+{
+ FreeLibrary((HMODULE)clientData);
+}
/*
*----------------------------------------------------------------------
*
@@ -1445,13 +1451,13 @@ TclpGetUserHome(
GetProcAddress(handle, "NetGetDCName");
netUserGetInfoProc = (NETUSERGETINFOPROC *)
GetProcAddress(handle, "NetUserGetInfo");
- Tcl_CreateExitHandler(TclpUnloadFile, handle);
+ Tcl_CreateExitHandler(FreeLoadLibHandle, handle);
}
handle = LoadLibraryA("userenv.dll");
if (handle) {
getProfilesDirectoryProc = (GETPROFILESDIRECTORYPROC *)
GetProcAddress(handle, "GetProfilesDirectoryW");
- Tcl_CreateExitHandler(TclpUnloadFile, handle);
+ Tcl_CreateExitHandler(FreeLoadLibHandle, handle);
}
apistubs = -1;