[Flac-dev] Compiler warnings using gcc-4.1

Erik de Castro Lopo erikd-flac at mega-nerd.com
Tue Dec 19 13:30:15 PST 2006


Hi Josh et al,

I'm compiling on an Ubuntu Edgy x86 machine. Edgy comes standard
with gcc-4.1 and I'm getting a number of warnings:

   memory.c: In function 'FLAC__memory_alloc_aligned':
   memory.c:52: warning: cast from pointer to integer of different size
   memory.c:52: warning: cast to pointer from integer of different size

   metadata_iterators.c: In function 'read_metadata_block_data_picture_cb_':
   metadata_iterators.c:2370: warning: dereferencing type-punned pointer will 
   break strict-aliasing rules

   metadata_object.c: In function 'FLAC__metadata_object_new':
   metadata_object.c:504: warning: dereferencing type-punned pointer will break 
   strict-aliasing rules
   metadata_object.c: In function 'FLAC__metadata_object_clone':
   metadata_object.c:548: warning: dereferencing type-punned pointer will break 
   strict-aliasing rules
   metadata_object.c:596: warning: dereferencing type-punned pointer will break 
   strict-aliasing rules
   metadata_object.c: In function 'FLAC__metadata_object_picture_set_mime_type':
   metadata_object.c:1710: warning: dereferencing type-punned pointer will break 
   strict-aliasing rules

   encode.c:2710: warning: 'limit_channel_mask' defined but not used

    http.c:433: warning: pointer targets in passing argument 5 of 'getsockopt' 
    differ in signedness

Are you interested in fixing these? The first and the last are pretty
easy to fix, but I know from my own code that the "dereferencing type-punned
pointer" warnings require more intrusive work to fix them.

Cheers,
Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"Christianity has a nasty habit of ignoring the major problems of
our time, including overpopulation and exhaustion of resources, 
because  they aren't mentioned in the Bible."
-- Paula L. Craig


More information about the Flac-dev mailing list