Re: [PACTH] sdbm.c, silent warning messages on gcc 2.95.3 with debug

2003-11-26 Thread Ben Laurie
Jeff Trawick wrote:

> ranier wrote:
> 
>> --- sdbm-old.c2003-07-08 19:55:04.0 -0300
>> +++ sdbm.c2003-07-08 19:57:52.0 -0300
>> @@ -495,7 +495,7 @@
>>  while (dbit < db->maxbno && getdbit(db, dbit))
>>  dbit = 2 * dbit + ((hash & (1 << hbit++)) ? 2 : 1);
>>  
>> -debug(("dbit: %d...", dbit));
>> +debug(("dbit: %lu...", dbit));
> 
> 
> shouldn't your changes use %ld instead of %lu?  It looks to me that dbit
> and pagb are longs, not unsigned longs.

Surely at least dbit should be unsigned?

Cheers,

Ben.

-- 
http://www.apache-ssl.org/ben.html   http://www.thebunker.net/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff




Re: [PACTH] sdbm.c, silent warning messages on gcc 2.95.3 with debug

2003-11-18 Thread Jeff Trawick
ranier wrote:

--- sdbm-old.c	2003-07-08 19:55:04.0 -0300
+++ sdbm.c	2003-07-08 19:57:52.0 -0300
@@ -495,7 +495,7 @@
 while (dbit < db->maxbno && getdbit(db, dbit))
 dbit = 2 * dbit + ((hash & (1 << hbit++)) ? 2 : 1);
 
-debug(("dbit: %d...", dbit));
+debug(("dbit: %lu...", dbit));
shouldn't your changes use %ld instead of %lu?  It looks to me that dbit and 
pagb are longs, not unsigned longs.




[PACTH] sdbm.c, silent warning messages on gcc 2.95.3 with debug

2003-07-09 Thread ranier

--- sdbm-old.c  2003-07-08 19:55:04.0 -0300
+++ sdbm.c  2003-07-08 19:57:52.0 -0300
@@ -495,7 +495,7 @@
 while (dbit < db->maxbno && getdbit(db, dbit))
 dbit = 2 * dbit + ((hash & (1 << hbit++)) ? 2 : 1);
 
-debug(("dbit: %d...", dbit));
+debug(("dbit: %lu...", dbit));
 
 db->curbit = dbit;
 db->hmask = masks[hbit];
@@ -520,7 +520,7 @@
 return APR_ENOSPC; /* ### better error? */
 db->pagbno = pagb;
 
-debug(("pag read: %d\n", pagb));
+debug(("pag read: %lu\n", pagb));
 }
 return APR_SUCCESS;
 }
@@ -540,7 +540,7 @@
 
 db->dirbno = dirb;
 
-debug(("dir read: %d\n", dirb));
+debug(("dir read: %lu\n", dirb));
 }
 
 return db->dirbuf[c % DBLKSIZ] & (1 << dbit % BYTESIZ);
@@ -563,7 +563,7 @@
 
 db->dirbno = dirb;
 
-debug(("dir read: %d\n", dirb));
+debug(("dir read: %lu\n", dirb));
 }
 
 db->dirbuf[c % DBLKSIZ] |= (1 << dbit % BYTESIZ);