summaryrefslogtreecommitdiffstats
path: root/win/tclWinTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-15 14:11:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-15 14:11:01 (GMT)
commit29d4ebbe2818e74bc84371fc4535ae97b7284524 (patch)
treef5e8c18910c1cefbfbfc9b7fed9e08756a889d6a /win/tclWinTest.c
parentfd1dbc086751dff48dbbbd4012e5f5ac0f46b06f (diff)
downloadtcl-29d4ebbe2818e74bc84371fc4535ae97b7284524.zip
tcl-29d4ebbe2818e74bc84371fc4535ae97b7284524.tar.gz
tcl-29d4ebbe2818e74bc84371fc4535ae97b7284524.tar.bz2
[Bug 3388350] mingw64 compiler warnings
Diffstat (limited to 'win/tclWinTest.c')
-rw-r--r--win/tclWinTest.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index 186d308..0ddd76b 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -538,7 +538,7 @@ TestplatformChmod(CONST char *nativePath, int pmode)
| FILE_ADD_SUBDIRECTORY | FILE_WRITE_EA | FILE_APPEND_DATA
| FILE_WRITE_DATA | DELETE;
- BYTE *secDesc = 0;
+ PSECURITY_DESCRIPTOR secDesc = 0;
DWORD secDescLen;
const BOOL set_readOnly = !(pmode & 0222);
@@ -670,9 +670,8 @@ TestplatformChmod(CONST char *nativePath, int pmode)
if (!getFileSecurityProc(nativePath, infoBits, NULL, 0, &secDescLen)) {
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
DWORD secDescLen2 = 0;
- secDesc = (BYTE *) ckalloc(secDescLen);
- if (!getFileSecurityProc(nativePath, infoBits,
- (PSECURITY_DESCRIPTOR)secDesc,
+ secDesc = (PSECURITY_DESCRIPTOR) ckalloc(secDescLen);
+ if (!getFileSecurityProc(nativePath, infoBits, secDesc,
secDescLen, &secDescLen2)
|| (secDescLen < secDescLen2)) {
goto done;