summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-04-25 22:29:30 +0000
committerimp <imp@FreeBSD.org>1999-04-25 22:29:30 +0000
commit404ab5f9ba8f886a2b4a3de13ab226213fd976bb (patch)
treead323a333603d18cc896ee80fad1f67b354df9de /lib/libc
parent8b33b875effcc83c5a2de2bd72e2c70b04652373 (diff)
downloadFreeBSD-src-404ab5f9ba8f886a2b4a3de13ab226213fd976bb.zip
FreeBSD-src-404ab5f9ba8f886a2b4a3de13ab226213fd976bb.tar.gz
More egcs warning fixes:
o use braces to avoid potentially ambiguous else o don't default to type int (and also remove a useless register modifier). o Use parens around assignment values used as truth values. o Remove unused function. Reviewed by: obrien and chuckr
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/locale/utf2.c2
-rw-r--r--lib/libc/string/memset.c2
-rw-r--r--lib/libc/string/strcat.c2
-rw-r--r--lib/libc/string/strcpy.c2
4 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/locale/utf2.c b/lib/libc/locale/utf2.c
index c46dd93..52b4cad 100644
--- a/lib/libc/locale/utf2.c
+++ b/lib/libc/locale/utf2.c
@@ -48,7 +48,7 @@ static char sccsid[] = "@(#)utf2.c 8.1 (Berkeley) 6/4/93";
rune_t _UTF2_sgetrune __P((const char *, size_t, char const **));
int _UTF2_sputrune __P((rune_t, char *, size_t, char **));
-static _utf_count[16] = {
+static int _utf_count[16] = {
1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 2, 2, 3, 0,
};
diff --git a/lib/libc/string/memset.c b/lib/libc/string/memset.c
index 55cca11..afe5f96 100644
--- a/lib/libc/string/memset.c
+++ b/lib/libc/string/memset.c
@@ -68,7 +68,9 @@ memset(dst0, c0, length)
#endif
{
register size_t t;
+#ifndef BZERO
register u_int c;
+#endif
register u_char *dst;
dst = dst0;
diff --git a/lib/libc/string/strcat.c b/lib/libc/string/strcat.c
index 3436967..95dcd1d 100644
--- a/lib/libc/string/strcat.c
+++ b/lib/libc/string/strcat.c
@@ -45,6 +45,6 @@ strcat(s, append)
char *save = s;
for (; *s; ++s);
- while (*s++ = *append++);
+ while ((*s++ = *append++));
return(save);
}
diff --git a/lib/libc/string/strcpy.c b/lib/libc/string/strcpy.c
index d1791dd..c9b44b1 100644
--- a/lib/libc/string/strcpy.c
+++ b/lib/libc/string/strcpy.c
@@ -45,6 +45,6 @@ strcpy(to, from)
{
char *save = to;
- for (; *to = *from; ++from, ++to);
+ for (; (*to = *from); ++from, ++to);
return(save);
}
OpenPOWER on IntegriCloud