summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorderaadt <>2001-07-09 06:57:45 +0000
committerderaadt <>2001-07-09 06:57:45 +0000
commit5ca33118ee381fe2484a9244aab71efe5cfdd924 (patch)
treefa9c5396add3b577dbec4565f937530d424d77e6 /src
parent4f70c6d1f894b725caae01ff86cc2448630c66f1 (diff)
downloadopenbsd-5ca33118ee381fe2484a9244aab71efe5cfdd924.tar.gz
openbsd-5ca33118ee381fe2484a9244aab71efe5cfdd924.tar.bz2
openbsd-5ca33118ee381fe2484a9244aab71efe5cfdd924.zip
a first pass at -Wall
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/stdlib/setenv.c7
-rw-r--r--src/lib/libc/stdlib/strtod.c12
2 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/libc/stdlib/setenv.c b/src/lib/libc/stdlib/setenv.c
index b6f261e61c..fc7c67a5db 100644
--- a/src/lib/libc/stdlib/setenv.c
+++ b/src/lib/libc/stdlib/setenv.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char *rcsid = "$OpenBSD: setenv.c,v 1.3 1998/02/02 22:44:53 millert Exp $"; 35static char *rcsid = "$OpenBSD: setenv.c,v 1.4 2001/07/09 06:57:45 deraadt Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <stdlib.h> 38#include <stdlib.h>
@@ -62,7 +62,8 @@ setenv(name, value, rewrite)
62 if (!rewrite) 62 if (!rewrite)
63 return (0); 63 return (0);
64 if (strlen(C) >= l_value) { /* old larger; copy over */ 64 if (strlen(C) >= l_value) { /* old larger; copy over */
65 while (*C++ = *value++); 65 while ((*C++ = *value++))
66 ;
66 return (0); 67 return (0);
67 } 68 }
68 } else { /* create new slot */ 69 } else { /* create new slot */
@@ -95,7 +96,7 @@ setenv(name, value, rewrite)
95 return (-1); 96 return (-1);
96 for (C = environ[offset]; (*C = *name++) && *C != '='; ++C) 97 for (C = environ[offset]; (*C = *name++) && *C != '='; ++C)
97 ; 98 ;
98 for (*C++ = '='; *C++ = *value++; ) 99 for (*C++ = '='; (*C++ = *value++); )
99 ; 100 ;
100 return (0); 101 return (0);
101} 102}
diff --git a/src/lib/libc/stdlib/strtod.c b/src/lib/libc/stdlib/strtod.c
index 9067934da0..44cc369b16 100644
--- a/src/lib/libc/stdlib/strtod.c
+++ b/src/lib/libc/stdlib/strtod.c
@@ -90,7 +90,7 @@
90 */ 90 */
91 91
92#if defined(LIBC_SCCS) && !defined(lint) 92#if defined(LIBC_SCCS) && !defined(lint)
93static char *rcsid = "$OpenBSD: strtod.c,v 1.13 2000/04/30 04:58:22 bjc Exp $"; 93static char *rcsid = "$OpenBSD: strtod.c,v 1.14 2001/07/09 06:57:45 deraadt Exp $";
94#endif /* LIBC_SCCS and not lint */ 94#endif /* LIBC_SCCS and not lint */
95 95
96#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ 96#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
@@ -395,7 +395,7 @@ Balloc
395 int x; 395 int x;
396 Bigint *rv; 396 Bigint *rv;
397 397
398 if (rv = freelist[k]) { 398 if ((rv = freelist[k])) {
399 freelist[k] = rv->next; 399 freelist[k] = rv->next;
400 } 400 }
401 else { 401 else {
@@ -643,7 +643,7 @@ mult
643 xc0 = c->x; 643 xc0 = c->x;
644#ifdef Pack_32 644#ifdef Pack_32
645 for(; xb < xbe; xb++, xc0++) { 645 for(; xb < xbe; xb++, xc0++) {
646 if (y = *xb & 0xffff) { 646 if ((y = *xb & 0xffff)) {
647 x = xa; 647 x = xa;
648 xc = xc0; 648 xc = xc0;
649 carry = 0; 649 carry = 0;
@@ -657,7 +657,7 @@ mult
657 while(x < xae); 657 while(x < xae);
658 *xc = carry; 658 *xc = carry;
659 } 659 }
660 if (y = *xb >> 16) { 660 if ((y = *xb >> 16)) {
661 x = xa; 661 x = xa;
662 xc = xc0; 662 xc = xc0;
663 carry = 0; 663 carry = 0;
@@ -708,7 +708,7 @@ pow5mult
708 int i; 708 int i;
709 static int p05[3] = { 5, 25, 125 }; 709 static int p05[3] = { 5, 25, 125 };
710 710
711 if (i = k & 3) 711 if ((i = k & 3))
712 b = multadd(b, p05[i-1], 0); 712 b = multadd(b, p05[i-1], 0);
713 713
714 if (!(k >>= 2)) 714 if (!(k >>= 2))
@@ -771,7 +771,7 @@ lshift
771 z = *x++ >> k1; 771 z = *x++ >> k1;
772 } 772 }
773 while(x < xe); 773 while(x < xe);
774 if (*x1 = z) 774 if ((*x1 = z))
775 ++n1; 775 ++n1;
776 } 776 }
777#else 777#else