summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-09 06:57:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-09 06:57:46 +0000
commit5e18c2b7bf584f7defb8b73f3e0a4843e3da9bbc (patch)
treed0465cd6e1cbbd6344562de8dd7480b043ae0fc2 /lib/libc/stdlib
parent89da542295094c69854c9bfec672d7f26cb8e581 (diff)
a first pass at -Wall
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/setenv.c7
-rw-r--r--lib/libc/stdlib/strtod.c12
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c
index b6f261e61cf..fc7c67a5db6 100644
--- a/lib/libc/stdlib/setenv.c
+++ b/lib/libc/stdlib/setenv.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: setenv.c,v 1.3 1998/02/02 22:44:53 millert Exp $";
+static char *rcsid = "$OpenBSD: setenv.c,v 1.4 2001/07/09 06:57:45 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdlib.h>
@@ -62,7 +62,8 @@ setenv(name, value, rewrite)
if (!rewrite)
return (0);
if (strlen(C) >= l_value) { /* old larger; copy over */
- while (*C++ = *value++);
+ while ((*C++ = *value++))
+ ;
return (0);
}
} else { /* create new slot */
@@ -95,7 +96,7 @@ setenv(name, value, rewrite)
return (-1);
for (C = environ[offset]; (*C = *name++) && *C != '='; ++C)
;
- for (*C++ = '='; *C++ = *value++; )
+ for (*C++ = '='; (*C++ = *value++); )
;
return (0);
}
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c
index 9067934da0a..44cc369b16f 100644
--- a/lib/libc/stdlib/strtod.c
+++ b/lib/libc/stdlib/strtod.c
@@ -90,7 +90,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strtod.c,v 1.13 2000/04/30 04:58:22 bjc Exp $";
+static char *rcsid = "$OpenBSD: strtod.c,v 1.14 2001/07/09 06:57:45 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
@@ -395,7 +395,7 @@ Balloc
int x;
Bigint *rv;
- if (rv = freelist[k]) {
+ if ((rv = freelist[k])) {
freelist[k] = rv->next;
}
else {
@@ -643,7 +643,7 @@ mult
xc0 = c->x;
#ifdef Pack_32
for(; xb < xbe; xb++, xc0++) {
- if (y = *xb & 0xffff) {
+ if ((y = *xb & 0xffff)) {
x = xa;
xc = xc0;
carry = 0;
@@ -657,7 +657,7 @@ mult
while(x < xae);
*xc = carry;
}
- if (y = *xb >> 16) {
+ if ((y = *xb >> 16)) {
x = xa;
xc = xc0;
carry = 0;
@@ -708,7 +708,7 @@ pow5mult
int i;
static int p05[3] = { 5, 25, 125 };
- if (i = k & 3)
+ if ((i = k & 3))
b = multadd(b, p05[i-1], 0);
if (!(k >>= 2))
@@ -771,7 +771,7 @@ lshift
z = *x++ >> k1;
}
while(x < xe);
- if (*x1 = z)
+ if ((*x1 = z))
++n1;
}
#else