summaryrefslogtreecommitdiffstats
path: root/usr.bin/m4/trace.c
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-04-20 01:49:10 +0000
committerjmallett <jmallett@FreeBSD.org>2002-04-20 01:49:10 +0000
commitecccdb870361f2e0e62aea65bc8fa21a5171ea06 (patch)
tree9d6147d43f9f794cfc750ecb3f50fb216c889a70 /usr.bin/m4/trace.c
parent2e75617aafa86c07bed18ac6c9afca1d637e0523 (diff)
downloadFreeBSD-src-ecccdb870361f2e0e62aea65bc8fa21a5171ea06.zip
FreeBSD-src-ecccdb870361f2e0e62aea65bc8fa21a5171ea06.tar.gz
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)
Diffstat (limited to 'usr.bin/m4/trace.c')
-rw-r--r--usr.bin/m4/trace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/m4/trace.c b/usr.bin/m4/trace.c
index 181e999..0a76195 100644
--- a/usr.bin/m4/trace.c
+++ b/usr.bin/m4/trace.c
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <err.h>
#include <stdlib.h>
+#include <string.h>
#include "mdef.h"
#include "stdd.h"
#include "extern.h"
OpenPOWER on IntegriCloud