summaryrefslogtreecommitdiffstats
path: root/win/tclWinFCmd.c
diff options
context:
space:
mode:
authormdejong <mdejong@noemail.net>2003-01-16 19:01:58 (GMT)
committermdejong <mdejong@noemail.net>2003-01-16 19:01:58 (GMT)
commit3c27c898a370a972f428790856e6eb1ca661e402 (patch)
tree56fc5ddd5f0d9e560d44bc912f29228edfa92437 /win/tclWinFCmd.c
parentbfad72422be11a4d95a4f6d3ec898ed46c21aa65 (diff)
downloadtcl-3c27c898a370a972f428790856e6eb1ca661e402.zip
tcl-3c27c898a370a972f428790856e6eb1ca661e402.tar.gz
tcl-3c27c898a370a972f428790856e6eb1ca661e402.tar.bz2
* win/tclWin32Dll.c (squelch_warnings): Squelch
compiler warnings from SEH ASM code. * win/tclWinChan.c (squelch_warnings): Squelch compiler warnings from SEH ASM code. * win/tclWinDde.c: Add casts to avoid compiler warnings. Pass pointer to DWORD instead of int to avoid compiler warnings. * win/tclWinFCmd.c (squelch_warnings): Add casts and fixup decls to avoid compiler warnings. Squelch compiler warnings from SEH ASM code. * win/tclWinFile.c: Add casts and fixup decls to avoid compiler warnings. Remove unused variable. * win/tclWinNotify.c: Declare as DWORD instead of int to avoid compiler warning. * win/tclWinReg.c: Add casts to avoid compiler warning. Fix assignment in if expression bug. * win/tclWinSerial.c: Add casts to avoid compiler warnings. Remove unused variable. * win/tclWinSock.c: Add casts and fixup decls to avoid compiler warnings. FossilOrigin-Name: bba93619da24b912054d7ebe92d24a0e64bf7ef7
Diffstat (limited to 'win/tclWinFCmd.c')
-rw-r--r--win/tclWinFCmd.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 0387aeb..f1d5dfe 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFCmd.c,v 1.31 2002/07/15 09:53:21 vincentdarley Exp $
+ * RCS: @(#) $Id: tclWinFCmd.c,v 1.32 2003/01/16 19:01:59 mdejong Exp $
*/
#include "tclWinInt.h"
@@ -251,7 +251,7 @@ DoRenameFile(
decode:
if (srcAttr & FILE_ATTRIBUTE_DIRECTORY) {
TCHAR *nativeSrcRest, *nativeDstRest;
- char **srcArgv, **dstArgv;
+ CONST char **srcArgv, **dstArgv;
int size, srcArgc, dstArgc;
WCHAR nativeSrcPath[MAX_PATH];
WCHAR nativeDstPath[MAX_PATH];
@@ -576,7 +576,7 @@ DoCopyFile(
}
if (dstAttr & FILE_ATTRIBUTE_READONLY) {
(*tclWinProcs->setFileAttributesProc)(nativeDst,
- dstAttr & ~FILE_ATTRIBUTE_READONLY);
+ dstAttr & ~((DWORD)FILE_ATTRIBUTE_READONLY));
if ((*tclWinProcs->copyFileProc)(nativeSrc, nativeDst, 0) != FALSE) {
return TCL_OK;
}
@@ -682,7 +682,7 @@ DoDeleteFile(
Tcl_SetErrno(EISDIR);
} else if (attr & FILE_ATTRIBUTE_READONLY) {
int res = (*tclWinProcs->setFileAttributesProc)(nativePath,
- attr & ~FILE_ATTRIBUTE_READONLY);
+ attr & ~((DWORD)FILE_ATTRIBUTE_READONLY));
if ((res != 0) && ((*tclWinProcs->deleteFileProc)(nativePath)
!= FALSE)) {
return TCL_OK;
@@ -1834,3 +1834,19 @@ TclpObjListVolumes(void)
Tcl_IncrRefCount(resultPtr);
return resultPtr;
}
+
+#ifdef HAVE_NO_SEH
+/*
+ * This method exists only to stop the compiler from emitting
+ * warnings about variables and methods accessed only from asm.
+ */
+static void squelch_warnings()
+{
+ void *ptr;
+ ptr = _except_dorenamefile_handler;
+ ptr = _except_docopyfile_handler;
+ ESP = 0;
+ EBP = 0;
+ squelch_warnings();
+}
+#endif /* HAVE_NO_SEH */