On Fri, 12 Nov 2010 00:20:31 +0100
Benoit Izac <ben...@izac.org> wrote:

> I wrote :
> 
> > patch attached.
> 
> I've got a better one which suppress the warning compilation.
> 
> [dspam.patch  text/x-patch (817B)]
> diff --git a/src/tools.hash_drv/cssstat.c b/src/tools.hash_drv/cssstat.c
> index dcf7ae2..031130b 100644
> --- a/src/tools.hash_drv/cssstat.c
> +++ b/src/tools.hash_drv/cssstat.c
> @@ -137,8 +137,7 @@ int cssstat(const char *filename) {
>        (unsigned long) header->hash_rec_max);
>      efree = eused = 0;
>      for(i=0;i<header->hash_rec_max;i++) {
> -      rec = map.addr;
> -      rec += filepos;
> +      rec = (void *) ((unsigned long) map.addr + filepos);
> 
On my local 32/64 bit safe version I use:
         rec = (hash_drv_spam_record_t)((uintptr_t)map.addr + filepos);

>        if (rec->hashcode) {
>          eused++;
>          nused++;
> @@ -148,8 +147,7 @@ int cssstat(const char *filename) {
>        }
>        filepos += sizeof(struct _hash_drv_spam_record);
>      }
> -    header = map.addr;
> -    header += filepos;
> +    header = (void *) ((unsigned long) map.addr + filepos);
> 
On my local 32/64 bit safe version I use:
       header = (hash_drv_header_t)((uintptr_t)map.addr + filepos);
 

>      filepos += sizeof(struct _hash_drv_header);
>      extents++;
>  
> 
> Nobody to commit it?
> 
I could commit your code if you want me to do so.


> Regards.
> -- 
-- 
Kind Regards from Switzerland,


> Benoit Izac
> 
Stevan Bajić

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Dspam-devel mailing list
Dspam-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to