From b297ff0dce26cde3cc43c0f929a44976936b601e Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 14 Jan 2011 16:03:13 +0000 Subject: Fix gcc-4.5.2 error: lvalue required as ... (backported from 8.5/8.6) --- ChangeLog | 5 +++++ win/tclWinDde.c | 6 +++--- win/tclWinReg.c | 6 ++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7df850f..1271f57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-01-14 Jan Nijtmans + + * win/tclWinDde.c: Fix gcc-4.5.2 error: lvalue required as ... + * win/tclWinReg.c: (backported from 8.5/8.6) + 2010-12-05 Jan Nijtmans * generic/tclCmdMZ.c: [Bug 3127687] Triggers FORTIFY_SOURCE diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 00e41a9..480c91f 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.13.2.7 2006/04/05 20:50:46 dgp Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.13.2.8 2011/01/14 16:03:14 nijtmans Exp $ */ #include "tclPort.h" @@ -987,7 +987,7 @@ Tcl_DdeObjCmd( ClientData clientData, /* Used only for deletion */ Tcl_Interp *interp, /* The interp we are sending from */ int objc, /* Number of arguments */ - Tcl_Obj *CONST objv[]) /* The arguments */ + Tcl_Obj *CONST *objv) /* The arguments */ { enum { DDE_SERVERNAME, @@ -1308,7 +1308,7 @@ Tcl_DdeObjCmd( } objc -= (async + 3); - ((Tcl_Obj **) objv) += (async + 3); + objv += (async + 3); /* * See if the target interpreter is local. If so, execute diff --git a/win/tclWinReg.c b/win/tclWinReg.c index cdce1aa..c5a5c6f 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.21.2.7 2007/05/15 16:08:22 dgp Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.21.2.8 2011/01/14 16:03:13 nijtmans Exp $ */ #include @@ -790,7 +790,9 @@ GetValue( Tcl_NewStringObj(Tcl_DStringValue(&buf), Tcl_DStringLength(&buf))); if (regWinProcs->useWide) { - while (*((Tcl_UniChar *)p)++ != 0) {} + Tcl_UniChar* up = (Tcl_UniChar*) p; + while (*up++ != 0) {} + p = (char*) up; } else { while (*p++ != '\0') {} } -- cgit v0.12