On 2008-10-17 21:26, Jason Bertoch wrote:
> Are the following warnings anything to worry about, or is this a libmilter 
> issue?
>
>
> clamav-milter.c: In function ‘clamfi_connect’:
> clamav-milter.c:2868: warning: passing argument 1 of ‘hosts_ctl’ discards 
> qualifiers from pointer target type
> clamav-milter.c: In function ‘clamfi_eom’:
> clamav-milter.c:3715: warning: passing argument 2 of ‘smfi_addrcpt’ 
> discards qualifiers from pointer target type
> clamav-milter.c:3998: warning: passing argument 2 of ‘smfi_addrcpt’ 
> discards qualifiers from pointer target type
> clamav-milter.c:4039: warning: passing argument 2 of ‘smfi_addrcpt’ 
> discards qualifiers from pointer target type
> clamav-milter.c:4069: warning: passing argument 2 of ‘smfi_setreply’ 
> discards qualifiers from pointer target type
>   

Hi,

libmilter declares those functions with char*, but they really have the
semantics of a const char* (AFAIK).

> clamav-milter.c: In function ‘updateSigFile’:
> clamav-milter.c:4495: warning: passing argument 1 of ‘cli_realloc’ 
> discards qualifiers from pointer target type
> clamav-milter.c:4497: warning: passing argument 2 of ‘cli_readn’ discards 
> qualifiers from pointer target type
>   

signature is set to NULL  at :1069, so those calls are safe, but maybe
the realloc should really be just a malloc.
And anyway if it would ever try to realloc a const char*, it would crash
right on startup, because gcc puts constant strings into memory marked
readonly.
Since we got no such bugreports, this is just a warning that you don't
have to worry about.

Best regards,
--Edwin


_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to