From 29d4ebbe2818e74bc84371fc4535ae97b7284524 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 15 Aug 2011 14:11:01 +0000 Subject: [Bug 3388350] mingw64 compiler warnings --- ChangeLog | 1 + win/tclWinDde.c | 12 ++++++------ win/tclWinFCmd.c | 2 +- win/tclWinTest.c | 7 +++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6237d99..963f194 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ * win/tclWinPort.h * win/tclWinChan.c * win/tclWinDde.c + * win/tclWinFCmd.c * win/tclWinPipe.c * win/tclWinReg.c * win/tclWinSerial.c diff --git a/win/tclWinDde.c b/win/tclWinDde.c index f16625c..f5882c6 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -844,8 +844,8 @@ DdeServicesOnAck(HWND hwnd, WPARAM wParam, LPARAM lParam) es = (ddeEnumServices *)GetWindowLong(hwnd, GWL_USERDATA); #endif - if ((es->service == (ATOM)NULL || es->service == service) - && (es->topic == (ATOM)NULL || es->topic == topic)) { + if ((es->service == (ATOM)0 || es->service == service) + && (es->topic == (ATOM)0 || es->topic == topic)) { Tcl_Obj *matchPtr = Tcl_NewListObj(0, NULL); GlobalGetAtomName(service, sz, 255); @@ -890,9 +890,9 @@ DdeGetServicesList(Tcl_Interp *interp, char *serviceName, char *topicName) es.interp = interp; es.result = TCL_OK; es.service = (serviceName == NULL) - ? (ATOM)NULL : GlobalAddAtom(serviceName); + ? (ATOM)0 : GlobalAddAtom(serviceName); es.topic = (topicName == NULL) - ? (ATOM)NULL : GlobalAddAtom(topicName); + ? (ATOM)0 : GlobalAddAtom(topicName); Tcl_ResetResult(interp); /* our list is to be appended to result. */ DdeCreateClient(&es); @@ -900,9 +900,9 @@ DdeGetServicesList(Tcl_Interp *interp, char *serviceName, char *topicName) if (IsWindow(es.hwnd)) DestroyWindow(es.hwnd); - if (es.service != (ATOM)NULL) + if (es.service != (ATOM)0) GlobalDeleteAtom(es.service); - if (es.topic != (ATOM)NULL) + if (es.topic != (ATOM)0) GlobalDeleteAtom(es.topic); return es.result; } diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 32e1656..e0861f2 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -1199,7 +1199,7 @@ TraverseWinTree( { DWORD sourceAttr; TCHAR *nativeSource, *nativeTarget, *nativeErrfile; - int result, found, sourceLen, targetLen, oldSourceLen, oldTargetLen; + int result, found, sourceLen, targetLen = 0, oldSourceLen, oldTargetLen; HANDLE handle; WIN32_FIND_DATAT data; 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; -- cgit v0.12