summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed/main.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2008-02-09 09:12:02 +0000
committerdwmalone <dwmalone@FreeBSD.org>2008-02-09 09:12:02 +0000
commit61bc7e9048ebb34f39561b8d4d27617996bfb776 (patch)
tree38656dcb8b2bba08e2797f1f8971c6ba6e82b602 /usr.bin/sed/main.c
parent7e24637c24d89a152b59a841be37492eb89f6306 (diff)
downloadFreeBSD-src-61bc7e9048ebb34f39561b8d4d27617996bfb776.zip
FreeBSD-src-61bc7e9048ebb34f39561b8d4d27617996bfb776.tar.gz
WARNS fixes:
1) Add missing parens around assignment that is compared to zero. 2) Make some variables that only take non-negative values unsigned. 3) Some casts/type changes to fix other constness warnings. 4) Make one variable a const char *. 5) Make sure termwidth is positive, it doesn't make sense for it to be negative. Approved by: dds
Diffstat (limited to 'usr.bin/sed/main.c')
-rw-r--r--usr.bin/sed/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c
index b3fa1f5..1a140b1 100644
--- a/usr.bin/sed/main.c
+++ b/usr.bin/sed/main.c
@@ -232,7 +232,7 @@ again:
state = ST_FILE;
goto again;
case CU_STRING:
- if ((snprintf(string_ident,
+ if (((size_t)snprintf(string_ident,
sizeof(string_ident), "\"%s\"", script->s)) >=
sizeof(string_ident) - 1)
(void)strcpy(string_ident +
OpenPOWER on IntegriCloud