From 9c2e378362223c670fe77827649dbdca520715c8 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 13 Mar 2011 22:42:24 +0000 Subject: * generic/tclAssembly.c (BBEmitInstInt1): Changed parameter data types in an effort to silence a MSVC warning reported by Ashok P. Nadkarni. Unable to test, since both forms work on my machine in VC2005, 2008. 2010, in both release and debug builds. * tests/tclTest.c (TestdstringCmd): Restored MSVC buildability broken by [5574bdd262], which changed the effective return type of 'ckalloc' from 'char*' to 'void*'. --- ChangeLog | 11 +++++++++++ generic/tclAssembly.c | 4 ++-- generic/tclTest.c | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10f1f55..372542e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-03-14 Kevin B. Kenny + + * generic/tclAssembly.c (BBEmitInstInt1): Changed parameter + data types in an effort to silence a MSVC warning reported by + Ashok P. Nadkarni. Unable to test, since both forms work on + my machine in VC2005, 2008. 2010, in both release and debug + builds. + * tests/tclTest.c (TestdstringCmd): Restored MSVC buildability + broken by [5574bdd262], which changed the effective return type + of 'ckalloc' from 'char*' to 'void*'. + 2011-03-13 Miguel Sofer * generic/tclExecute.c: remove TEBCreturn() diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 45756eb..754941f 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -241,7 +241,7 @@ static void BBAdjustStackDepth(BasicBlock* bbPtr, int consumed, static void BBUpdateStackReqs(BasicBlock* bbPtr, int tblIdx, int count); static void BBEmitInstInt1(AssemblyEnv* assemEnvPtr, int tblIdx, - unsigned char opnd, int count); + int opnd, int count); static void BBEmitInstInt4(AssemblyEnv* assemEnvPtr, int tblIdx, int opnd, int count); static void BBEmitInst1or4(AssemblyEnv* assemEnvPtr, int tblIdx, @@ -652,7 +652,7 @@ static void BBEmitInstInt1( AssemblyEnv* assemEnvPtr, /* Assembly environment */ int tblIdx, /* Index in TalInstructionTable of op */ - unsigned char opnd, /* 1-byte operand */ + int opnd, /* 1-byte operand */ int count) /* Operand count for variadic ops */ { BBEmitOpcode(assemEnvPtr, tblIdx, count); diff --git a/generic/tclTest.c b/generic/tclTest.c index 2e9a9e8..b757185 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -1767,7 +1767,7 @@ TestdstringCmd( strcpy(s, "This is a malloc-ed string"); Tcl_SetResult(interp, s, TCL_DYNAMIC); } else if (strcmp(argv[2], "special") == 0) { - char *s = ckalloc(100) + 16; + char *s = (char*)ckalloc(100) + 16; strcpy(s, "This is a specially-allocated string"); Tcl_SetResult(interp, s, SpecialFree); } else { -- cgit v0.12