-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Martin Michlmayr wrote: > There are mor errors when compiling with 4.1, e.g: > > gcc -pipe -Werror -Wall -W -Wunused -Wshadow -Wpointer-arith > -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings > -Wno-sign-compare -Wstrict-prototypes -Wmissing-prototypes > -Wmissing-declarations -Wmissing-noreturn -Wnested-externs -g -O2 > -fomit-frame-pointer -Wno-trigraphs -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -I. -I. -DFS_IS_minix -c -o > defrag.minix.o defrag.c > cc1: warnings being treated as errors > defrag.c: In function 'walk_zone_ind': > defrag.c:297: warning: cast increases required alignment of target type > defrag.c: In function 'walk_zone_dind': > defrag.c:341: warning: cast increases required alignment of target type > defrag.c: In function 'scan_used_inodes': > defrag.c:530: warning: cast increases required alignment of target type > defrag.c:534: warning: cast increases required alignment of target type > defrag.c: In function 'read_priority_file': > defrag.c:621: warning: cast increases required alignment of target type > defrag.c: In function 'sort_inodes': > defrag.c:683: warning: cast increases required alignment of target type > defrag.c: In function 'main': > defrag.c:795: warning: cast increases required alignment of target type > defrag.c:801: warning: cast increases required alignment of target type > defrag.c:815: warning: cast increases required alignment of target type > make[1]: *** [defrag.minix.o] Error 1 > make[1]: Leaving directory `/build/tbm/defrag-0.73pjm1' >
When I build defrag, (with gcc 4.1) then I see these errors: cc1: warnings being treated as errors e2dump.c: In function ?dump_super?: e2dump.c:474: warning: dereferencing type-punned pointer will break strict-aliasing rules e2dump.c:476: warning: dereferencing type-punned pointer will break strict-aliasing rules e2dump.c: In function ?dump_inode?: e2dump.c:506: warning: dereferencing type-punned pointer will break strict-aliasing rules e2dump.c:507: warning: dereferencing type-punned pointer will break strict-aliasing rules e2dump.c:508: warning: dereferencing type-punned pointer will break strict-aliasing rules e2dump.c:516: warning: dereferencing type-punned pointer will break strict-aliasing rules make[1]: *** [e2dump.ext2.o] Error 1 After fixing them everything builds fine... (patch attached) Regards, Matthijs Mohlmann -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEEueL2n1ROIkXqbARAmZvAJ9X5Qx6GC84gjcj5QtBGnP6IRnRhwCggo5V 2xa7jy6oKqHfEGoX6u9xq6I= =Q7FP -----END PGP SIGNATURE-----
#! /bin/sh /usr/share/dpatch/dpatch-run ## e2dump-c.dpatch by Matthijs Mohlmann <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad defrag-0.73pjm1~/e2dump.c defrag-0.73pjm1/e2dump.c --- defrag-0.73pjm1~/e2dump.c 2006-03-11 16:04:12.890598832 +0100 +++ defrag-0.73pjm1/e2dump.c 2006-03-11 16:04:37.964786976 +0100 @@ -470,9 +470,9 @@ printf("Inodes per group:%lu\n", (unsigned long) s.s_inodes_per_group); /* # Inodes per group */ printf("mount time:%s", - ctime ((time_t *) &s.s_mtime)); /* Mount time */ + ctime ((time_t *) s.s_mtime)); /* Mount time */ printf("write time:%s", - ctime ((time_t *) &s.s_wtime)); /* Write time */ + ctime ((time_t *) s.s_wtime)); /* Write time */ printf("magic:0x%X", s.s_magic); /* Magic signature */ if (s.s_magic == EXT2_SUPER_MAGIC) printf(" (OK)\n"); else printf(" (???) "); @@ -502,9 +502,9 @@ printf("Owner Uid %d ",(uint) n.i_uid); printf("Group Id %d\n",(uint) n.i_gid); printf("File size %lu\n", (unsigned long) n.i_size); - printf("Access time : %s", ctime ((time_t *) &n.i_atime)); - printf("Creation time : %s", ctime ((time_t *) &n.i_ctime)); - printf("Modification time: %s", ctime ((time_t *) &n.i_mtime)); + printf("Access time : %s", ctime ((time_t *) n.i_atime)); + printf("Creation time : %s", ctime ((time_t *) n.i_ctime)); + printf("Modification time: %s", ctime ((time_t *) n.i_mtime)); if (inode_is_busy(inode_no)) { if (n.i_dtime!=0) printf("ERROR: bitmap is 1 "); } @@ -512,7 +512,7 @@ if (n.i_dtime==0 && n.i_ctime!=0) printf("ERROR: bitmap is 0\n "); if (n.i_dtime!=0) - printf("Deletion time : %s", ctime ((time_t *) &n.i_dtime)); + printf("Deletion time : %s", ctime ((time_t *) n.i_dtime)); printf("Links count: %d\n", (uint) n.i_links_count); /* in 512 byte blocks for some unknown reason */ printf("512-Blocks count: %lu\n", (unsigned long) n.i_blocks);