[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] How serious is GCC "cast increases requiered alignment of target type" warning?
Am Mittwoch, den 26.05.2010, 13:51 +0200 schrieb Peter Slegg
<p.slegg@scubadivers.co.uk>:
> I get lots of these warnings when compiling photorec with gcc 2.95
> on the Milan.
As far as I understand, this warning is not that bad. It just tells you:
cast increases required alignment of target type ;)
But I'm afraid about this: Is gcc smart enough to really increase the
alignment???
It would be nice if GCC would spit out something like:
"cast increases required alignment of target type, but I'm not going to
align it for you!"
Or:
"cast increases required alignment of target type, I'm going to align it
as required!"
>
>
> source='photorec.c' object='photorec.o' libtool=no \
> DEPDIR=.deps depmode=gcc /bin/sh ../config/depcomp \
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -MD -Wpointer-arith
> -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wshadow
> -Wwrite-strings -W -Wcast-align -Waggregate-return -Wbad-function-cast
> -Wcast-qual -Wundef -Wredundant-decls -Wsign-compare -Wnested-externs
> -Winline -c photorec.c
> In file included from photorec.c:52:
> /usr/include/signal.h:107: warning: redundant redeclaration of `psignal'
> in same scope
> /usr/include/unistd.h:1036: warning: previous declaration of `psignal'
> In file included from types.h:25,
> from photorec.c:58:
> /usr/include/inttypes.h: In function `imaxdiv':
> /usr/include/inttypes.h:319: warning: function returns an aggregate
> /usr/include/inttypes.h:320: warning: function call has aggregate value
> photorec.c: In function `list_free_add':
> photorec.c:236: warning: cast increases required alignment of target
type
> photorec.c: In function `update_search_space':
> photorec.c:273: warning: cast increases required alignment of target
type
> photorec.c: In function `update_search_space_aux':
> photorec.c:309: warning: cast increases required alignment of target
type
> photorec.c:334: warning: cast increases required alignment of target
type
> photorec.c:338: warning: cast increases required alignment of target
type
> photorec.c:355: warning: cast increases required alignment of target
type
> photorec.c:364: warning: cast increases required alignment of target
type
> photorec.c:368: warning: cast increases required alignment of target
type
> photorec.c: In function `free_list_search_space':
> photorec.c:429: warning: cast increases required alignment of target
type
> photorec.c: In function `get_prev_file_header':
> photorec.c:531: warning: cast increases required alignment of target
type
> photorec.c: In function `forget':
> photorec.c:559: warning: cast increases required alignment of target
type
> photorec.c: In function `list_cluster_free':
> photorec.c:575: warning: cast increases required alignment of target
type
> photorec.c: In function `update_stats':
> photorec.c:604: warning: cast increases required alignment of target
type
> photorec.c: In function `find_blocksize_cluster':
> photorec.c:717: warning: cast increases required alignment of target
type
> photorec.c: In function `find_blocksize':
> photorec.c:767: warning: cast increases required alignment of target
type
> photorec.c:775: warning: cast increases required alignment of target
type
> photorec.c: In function `update_blocksize':
> photorec.c:791: warning: cast increases required alignment of target
type
> photorec.c:797: warning: cast increases required alignment of target
type
> photorec.c: In function `data_check_size':
> photorec.c:1153: warning: unused parameter `buffer'
> photorec.c:1153: warning: unused parameter `buffer_size'
> photorec.c: In function `file_finish':
> photorec.c:1246: warning: cast increases required alignment of target
type
> gcc -g -O2 -Wall -MD -Wpointer-arith -Wmissing-declarations
> -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wwrite-strings -W
> -Wcast-align -Waggregate-return -Wbad-function-cast -Wcast-qual -Wundef
> -Wredundant-decls -Wsign-compare -Wnested-externs -Winline -o photorec
> photorec.o phrecn.o dir.o fat_dir.o fatp.o filegen.o file_7z.o file_a.o
> file_ab.o file_ace.o file_aif.o file_all.o file_asf.o file_au.o
file_bkf.o
> file_bld.o file_bmp.o file_bz2.o file_cab.o file_cam.o file_crw.o
> file_ctg.o file_cwk.o file_dat.o file_dbf.o file_dir.o file_djv.o
> file_doc.o file_dsc.o file_dta.o file_dv.o file_elf.o file_evt.o
file_exe.o
> file_ext.o file_fh10.o file_fh5.o file_flac.o file_flv.o file_fs.o
> file_gif.o file_gz.o file_imb.o file_indd.o file_dump.o file_itu.o
> file_jpg.o file_max.o file_mdb.o file_mdf.o file_mid.o file_mkv.o
> file_mov.o file_mp3.o file_mpg.o file_mrw.o file_mus.o file_mysql.o
> file_njx.o file_ogg.o file_orf.o file_pap.o file_pcx.o file_pdf.o
> file_png.o file_prc.o fil
> e_ps.o file_psd.o file_pst.o fi