Module Name: src Committed By: christos Date: Mon Mar 21 04:52:09 UTC 2011
Modified Files: src/lib/libc/gdtoa: gdtoaimp.h hexnan.c misc.c Log Message: fix some lint on i386 To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/gdtoa/gdtoaimp.h cvs rdiff -u -r1.4 -r1.5 src/lib/libc/gdtoa/hexnan.c cvs rdiff -u -r1.6 -r1.7 src/lib/libc/gdtoa/misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/gdtoa/gdtoaimp.h diff -u src/lib/libc/gdtoa/gdtoaimp.h:1.9 src/lib/libc/gdtoa/gdtoaimp.h:1.10 --- src/lib/libc/gdtoa/gdtoaimp.h:1.9 Sun Mar 20 19:15:35 2011 +++ src/lib/libc/gdtoa/gdtoaimp.h Mon Mar 21 00:52:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gdtoaimp.h,v 1.9 2011/03/20 23:15:35 christos Exp $ */ +/* $NetBSD: gdtoaimp.h,v 1.10 2011/03/21 04:52:09 christos Exp $ */ /**************************************************************** @@ -581,7 +581,7 @@ extern CONST double bigtens[], tens[], tinytens[]; extern unsigned char hexdig[]; - extern Bigint *Balloc ANSI((size_t)); + extern Bigint *Balloc ANSI((int)); extern void Bfree ANSI((Bigint*)); extern void ULtof ANSI((ULong*, ULong*, Long, int)); extern void ULtod ANSI((ULong*, ULong*, Long, int)); Index: src/lib/libc/gdtoa/hexnan.c diff -u src/lib/libc/gdtoa/hexnan.c:1.4 src/lib/libc/gdtoa/hexnan.c:1.5 --- src/lib/libc/gdtoa/hexnan.c:1.4 Sun Mar 20 19:15:35 2011 +++ src/lib/libc/gdtoa/hexnan.c Mon Mar 21 00:52:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hexnan.c,v 1.4 2011/03/20 23:15:35 christos Exp $ */ +/* $NetBSD: hexnan.c,v 1.5 2011/03/21 04:52:09 christos Exp $ */ /**************************************************************** @@ -79,7 +79,7 @@ if (s[1] == '0' && (s[2] == 'x' || s[2] == 'X') && *(CONST unsigned char*)(s+3) > ' ') s += 2; - while((c = *(CONST unsigned char*)++s)) { + while((c = *(CONST unsigned char*)++s) != '\0') { if (!(h = hexdig[c])) { if (c <= ' ') { if (hd0 < havedig) { @@ -111,7 +111,7 @@ *sp = s + 1; break; } - } while((c = *++s)); + } while((c = *++s) != '\0'); #endif return STRTOG_NaN; } Index: src/lib/libc/gdtoa/misc.c diff -u src/lib/libc/gdtoa/misc.c:1.6 src/lib/libc/gdtoa/misc.c:1.7 --- src/lib/libc/gdtoa/misc.c:1.6 Sun Mar 20 19:15:35 2011 +++ src/lib/libc/gdtoa/misc.c Mon Mar 21 00:52:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.6 2011/03/20 23:15:35 christos Exp $ */ +/* $NetBSD: misc.c,v 1.7 2011/03/21 04:52:09 christos Exp $ */ /**************************************************************** @@ -45,9 +45,9 @@ Bigint * Balloc #ifdef KR_headers - (k) size_t k; + (k) int k; #else - (size_t k) + (int k) #endif { int x; @@ -59,17 +59,17 @@ ACQUIRE_DTOA_LOCK(0); /* The k > Kmax case does not need ACQUIRE_DTOA_LOCK(0), */ /* but this case seems very unlikely. */ - if (k <= Kmax && (rv = freelist[k]) !=0) { + if ((size_t)k <= Kmax && (rv = freelist[k]) !=0) { freelist[k] = rv->next; } else { - x = 1 << (int)k; + x = 1 << k; #ifdef Omit_Private_Memory rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(ULong)); #else len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1) /sizeof(double); - if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) { + if ((size_t)k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) { rv = (Bigint*)(void *)pmem_next; pmem_next += len; } @@ -78,7 +78,7 @@ #endif if (rv == NULL) return NULL; - rv->k = (int)k; + rv->k = k; rv->maxwds = x; } FREE_DTOA_LOCK(0);