You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by ranier <ra...@cultura.com.br> on 2003/07/09 01:09:06 UTC

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


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

Posted by Ben Laurie <be...@algroup.co.uk>.
Jeff Trawick wrote:

> ranier wrote:
> 
>> --- sdbm-old.c    2003-07-08 19:55:04.000000000 -0300
>> +++ sdbm.c    2003-07-08 19:57:52.000000000 -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

Posted by Jeff Trawick <tr...@attglobal.net>.
ranier wrote:

> --- sdbm-old.c	2003-07-08 19:55:04.000000000 -0300
> +++ sdbm.c	2003-07-08 19:57:52.000000000 -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.