summaryrefslogtreecommitdiffstats
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
parentfd1dbc086751dff48dbbbd4012e5f5ac0f46b06f (diff)
downloadtcl-29d4ebbe2818e74bc84371fc4535ae97b7284524.zip
tcl-29d4ebbe2818e74bc84371fc4535ae97b7284524.tar.gz
tcl-29d4ebbe2818e74bc84371fc4535ae97b7284524.tar.bz2
[Bug 3388350] mingw64 compiler warnings
-rw-r--r--ChangeLog1
-rw-r--r--win/tclWinDde.c12
-rw-r--r--win/tclWinFCmd.c2
-rw-r--r--win/tclWinTest.c7
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;