Zakhar Levchenko kirjoitti:
>
>
> On 5/25/08, *Clive Wright* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Since upgrading my distro to Ubuntu Hardy and with it gcc to
>     version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) I have been getting compiler
>     warnings when building oss from hg (see attachment).
>
>     Not fatal I know but nevertheless disturbing especially as I have
>     been unable to correct the problem.
>
>     Can someone tell me what is really wrong and more importantly how
>     to fix it?
>
>     Kind regards,
>     Clive
>
>     oss_grc3.c: In function ‘grc3_convert’:
>     oss_grc3.c:243: warning: passing argument 2 of
>     ‘grc3_resample_L8_8’ discards qualifiers from pointer target type
>     oss_grc3.c:246: warning: passing argument 2 of
>     ‘grc3_resample_L32_32’ discards qualifiers from pointer target
>     type
>     oss_grc3.c:248: warning: passing argument 2 of
>     ‘grc3_resample_L8_8’ discards qualifiers from pointer target type
>     oss_grc3.c:251: warning: passing argument 2 of
>     ‘grc3_resample_L32_32’ discards qualifiers from pointer target
>     type
>     oss_grc3.c:254: warning: passing argument 2 of
>     ‘grc3_resample_M8_8’ discards qualifiers from pointer target type
>     oss_grc3.c:257: warning: passing argument 2 of
>     ‘grc3_resample_M32_32’ discards qualifiers from pointer target
>     type
>     oss_grc3.c:260: warning: passing argument 2 of
>     ‘grc3_resample_H8_8’ discards qualifiers from pointer target type
>     oss_grc3.c:261: warning: passing argument 2 of
>     ‘grc3_resample_H16_16’ discards qualifiers from pointer target
>     type
>     oss_grc3.c:263: warning: passing argument 2 of
>     ‘grc3_resample_H32_32’ discards qualifiers from pointer target
>     type
>     oss_grc3.c:265: warning: passing argument 2 of
>     ‘grc3_resample_HX8_8’ discards qualifiers from pointer target type
>     oss_grc3.c:268: warning: passing argument 2 of
>     ‘grc3_resample_HX32_32’ discards qualifiers from pointer
>     target type
>     oss_grc3.c:271: warning: passing argument 2 of
>     ‘grc3_resample_P8_8’ discards qualifiers from pointer target type
>     oss_grc3.c:274: warning: passing argument 2 of
>     ‘grc3_resample_P32_32’ discards qualifiers from pointer target
>     type
>     oss_grc3.c:276: warning: passing argument 2 of
>     ‘grc3_resample_PX8_8’ discards qualifiers from pointer target type
>     oss_grc3.c:279: warning: passing argument 2 of
>     ‘grc3_resample_PX32_32’ discards qualifiers from pointer
>     target type
>     oss_grc3.c:279: warning: passing argument 2 of
>     ‘grc3_resample_PXv32_v32’ discards qualifiers from pointer
>     target type
>
>     _______________________________________________
>     oss-devel mailing list
>     oss-devel@mailman.opensound.com
>     <mailto:oss-devel@mailman.opensound.com>
>     http://mailman.opensound.com/mailman/listinfo/oss-devel
>
>
>
> Hi Clive,
>
> I think it's a gcc issue. When src argument is passed to 
> grc3_resample_*** functions it is explicitly casted to (void *) type, 
> so such warnings should not appear. It seems that gcc for some reason 
> in some cases acts as if no cast is applied. Note that these warnings 
> don't appear for every DECLCVT macro which is strange. It's 
> interesting that when I tried to compile oss_grc3.c file stand alone 
> no warnings appeared. 
>
> These warnings are absolutely harmless, so I don't think we should do 
> anything with them. There is a funny workaround though. You can find 
> "static __inline__ int32_t SUFFIX (grc3_resample_)" definition in 
> grc3inc.inc and add "const" qualifier before "void *src". But I hate 
> the idea to work around gcc bugs.
Or the problem may be caused by "const void *" type of the src parameter 
of grc3_convert. The grc3_resample routine doesn't have const. I did a 
modification to the hg version where "const" is removed. Maybe it fixes 
the warning.

Strange that I don't get this warning in my Linux system(s).

Best regards,

Hannu
_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to