From ea0295332cb0b7c680cc7c47a2e9676a02b04b16 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 22:02:58 +0000 Subject: Eliminate various gcc warnings (in -Wextra mode) --- ChangeLog | 1 - win/tclWinReg.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06f6f85..4a68004 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,7 +19,6 @@ * win/tclWinInit.c * win/tclWinChan.c * win/tclWinConsole.c - * win/tclWinFile.c * win/tclWinNotify.c * win/tclWinReg.c * library/auto.tcl Eliminate "then" keyword diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 849e9a9..e6d5b7a 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.46 2009/08/16 10:20:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.47 2009/11/18 22:02:58 nijtmans Exp $ */ #include "tclInt.h" @@ -742,7 +742,7 @@ GetType( * know about the type, just use the numeric value. */ - if (type > lastType || type < 0) { + if (type > lastType) { Tcl_SetObjResult(interp, Tcl_NewIntObj((int) type)); } else { Tcl_SetObjResult(interp, Tcl_NewStringObj(typeNames[type], -1)); @@ -1602,7 +1602,7 @@ ConvertDWORD( */ localType = (*((char*) &order) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; - return (type != localType) ? SWAPLONG(value) : value; + return (type != localType) ? (DWORD)SWAPLONG(value) : value; } /* -- cgit v0.12