From owner-cvs-all Fri Apr 19 18:49:18 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5548037B420; Fri, 19 Apr 2002 18:49:11 -0700 (PDT) Received: (from jmallett@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3K1nBS16684; Fri, 19 Apr 2002 18:49:11 -0700 (PDT) (envelope-from jmallett) Message-Id: <200204200149.g3K1nBS16684@freefall.freebsd.org> From: "J. Mallett" Date: Fri, 19 Apr 2002 18:49:11 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/m4 Makefile eval.c expr.c extern.h gnum4.c main.c mdef.h misc.c trace.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jmallett 2002/04/19 18:49:11 PDT Modified files: usr.bin/m4 Makefile eval.c expr.c extern.h gnum4.c main.c mdef.h misc.c trace.c Log: Crank WARNS. Cast sizeof() to (int), as it's being compared against an int, not a size_t. If i is changed to a size_t, it means the logic must be slightly changed later in the flow, where --i is checked to be >= 0. I am not sure I want to make a logic change to account for clearing up a warning, when an aesthetic one will keep from modifying the logic. Other harmless casts, that I think I've made in the right directions. Make gpbc() an inline function, rather than an obfuscated macro, make its scratch space local, rather than global. The previous macro used a dirty hack (logical AND in place of a conditional) which would lead GCC to throw a fit (rightly so) as the logical check, as well as the incrementation of a variable, were not used for anything. const'ify a few places where gcc3 yells. xstrdup() some global consts in places where we xstrdup() when not using consts, but tried to assign them to non-consts before. Don't use execv(2) if we don't have the kind of arguments it wants. Reviewed by: asmodai obrien tjr Submitted by: tjr (a gcc3 build log) Revision Changes Path 1.4 +1 -0 src/usr.bin/m4/Makefile 1.17 +5 -5 src/usr.bin/m4/eval.c 1.6 +4 -6 src/usr.bin/m4/expr.c 1.9 +20 -4 src/usr.bin/m4/extern.h 1.3 +3 -9 src/usr.bin/m4/gnum4.c 1.14 +9 -10 src/usr.bin/m4/main.c 1.7 +1 -5 src/usr.bin/m4/mdef.h 1.11 +3 -3 src/usr.bin/m4/misc.c 1.3 +1 -0 src/usr.bin/m4/trace.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message