*: suppress ~60% of "aliased warnings" on gcc-4.4.1
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 4 Feb 2010 14:00:15 +0000 (15:00 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 4 Feb 2010 14:00:15 +0000 (15:00 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
49 files changed:
archival/libunarchive/get_header_tar.c
archival/lzop.c
console-tools/resize.c
coreutils/dd.c
coreutils/du.c
coreutils/expr.c
coreutils/ls.c
coreutils/stty.c
coreutils/tail.c
debianutils/run_parts.c
debianutils/start_stop_daemon.c
editors/awk.c
editors/sed.c
findutils/find.c
findutils/grep.c
include/platform.h
miscutils/crond.c
miscutils/dc.c
miscutils/hdparm.c
modutils/modprobe.c
modutils/modutils-24.c
networking/arp.c
networking/arping.c
networking/ftpd.c
networking/ftpgetput.c
networking/ifupdown.c
networking/inetd.c
networking/ping.c
networking/slattach.c
networking/tc.c
networking/tcpudp.c
networking/telnet.c
networking/telnetd.c
networking/tftp.c
networking/wget.c
networking/zcip.c
procps/ps.c
procps/top.c
runit/runsv.c
runit/runsvdir.c
runit/sv.c
runit/svlogd.c
selinux/setfiles.c
sysklogd/logread.c
util-linux/fsck_minix.c
util-linux/mdev.c
util-linux/more.c
util-linux/mount.c
util-linux/swaponoff.c

index 982404d14cb8494752ad5185a8c99dcd9709315a..d5b86ff5c4704720d4217ed98bb668668eba2b5a 100644 (file)
 #include "libbb.h"
 #include "unarchive.h"
 
+typedef uint32_t aliased_uint32_t FIX_ALIASING;
+typedef off_t    aliased_off_t    FIX_ALIASING;
+
+
 /*
  * GNU tar uses "base-256 encoding" for very large numbers (>8 billion).
  * Encoding is binary, with highest bit always set as a marker
@@ -68,10 +72,10 @@ static off_t getBase256_len12(const char *str)
  * and fetch it in one go:
  */
        if (sizeof(off_t) == 8) {
-               value = *(off_t*)str;
+               value = *(aliased_off_t*)str;
                value = SWAP_BE64(value);
        } else if (sizeof(off_t) == 4) {
-               value = *(off_t*)str;
+               value = *(aliased_off_t*)str;
                value = SWAP_BE32(value);
        } else {
                value = 0;
@@ -156,7 +160,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
 
 #if ENABLE_DESKTOP || ENABLE_FEATURE_TAR_AUTODETECT
        /* to prevent misdetection of bz2 sig */
-       *(uint32_t*)(&tar) = 0;
+       *(aliased_uint32_t*)&tar = 0;
        i = full_read(archive_handle->src_fd, &tar, 512);
        /* If GNU tar sees EOF in above read, it says:
         * "tar: A lone zero block at N", where N = kilobyte
index a752a9d89fea859c52451c8e1abcc25d4c1cdb5f..0a15c51aa7d7b526a6cdb7d80f8da886bf77acdd 100644 (file)
@@ -396,7 +396,7 @@ struct globals {
        const uint32_t *lzo_crc32_table;
        chksum_t chksum_in;
        chksum_t chksum_out;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { } while (0)
 //#define G (*ptr_to_globals)
index 4504cc85d61a9261e33e1321b7adc90dac118e2b..828b5bb42960022d8b8a4e4f63d20f3659da7350 100644 (file)
 
 #define ESC "\033"
 
-#define old_termios (*(struct termios*)&bb_common_bufsiz1)
+#define old_termios_p ((struct termios*)&bb_common_bufsiz1)
 
 static void
 onintr(int sig UNUSED_PARAM)
 {
-       tcsetattr(STDERR_FILENO, TCSANOW, &old_termios);
+       tcsetattr(STDERR_FILENO, TCSANOW, old_termios_p);
        exit(EXIT_FAILURE);
 }
 
@@ -33,8 +33,8 @@ int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
         * and operate on it - should we do the same?
         */
 
-       tcgetattr(STDERR_FILENO, &old_termios); /* fiddle echo */
-       new = old_termios;
+       tcgetattr(STDERR_FILENO, old_termios_p); /* fiddle echo */
+       memcpy(&new, old_termios_p, sizeof(new));
        new.c_cflag |= (CLOCAL | CREAD);
        new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
        bb_signals(0
@@ -61,7 +61,7 @@ int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
         * (gotten via TIOCGWINSZ) and recomputing *pixel values */
        ret = ioctl(STDERR_FILENO, TIOCSWINSZ, &w);
 
-       tcsetattr(STDERR_FILENO, TCSANOW, &old_termios);
+       tcsetattr(STDERR_FILENO, TCSANOW, old_termios_p);
 
        if (ENABLE_FEATURE_RESIZE_PRINT)
                printf("COLUMNS=%d;LINES=%d;export COLUMNS LINES;\n",
index 8173d403d0dec6261203b22df595347cbdd5f2d4..7c1a0c0df12869688ead0da839b886ef01e5103c 100644 (file)
@@ -38,7 +38,7 @@ struct globals {
        unsigned long long total_bytes;
        unsigned long long begin_time_us;
 #endif
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { \
        /* we have to zero it out because of NOEXEC */ \
index 730d6d162eb4fccceedce4bdb08dcc79a7e83978..5894ed43824157bce72d3e92c3305533fc359cbd 100644 (file)
@@ -50,7 +50,7 @@ struct globals {
        int slink_depth;
        int du_depth;
        dev_t dir_dev;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 
 
index f5701a460e1b643ff432f6634a55fbe864301013..f40edad4e36253777effad0401a9a49e9fc96313 100644 (file)
@@ -63,7 +63,7 @@ typedef struct valinfo VALUE;
 /* The arguments given to the program, minus the program name.  */
 struct globals {
        char **args;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 
 /* forward declarations */
index d004ce8b153062baa0cc102bbaea889723edc089..1197f7d715714202a98a69aa0d1ec1642832ba28 100644 (file)
@@ -255,7 +255,7 @@ struct globals {
        /* Do time() just once. Saves one syscall per file for "ls -l" */
        time_t current_time_t;
 #endif
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #if ENABLE_FEATURE_LS_COLOR
 # define show_color     (G.show_color    )
index 4952d53d3d14f3578524a4e2ca32aafd437849de..c40d718affd27bdbd348d690a2daa3c19dbc32af 100644 (file)
@@ -625,7 +625,7 @@ struct globals {
        /* Current position, to know when to wrap */
        unsigned current_col;
        char buf[10];
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { \
        G.device_name = bb_msg_standard_input; \
index 0be16631509aef0ded97004e9ee64bb3ab526a63..83768d4208c54470f2c2f5bdd467d77719e0218f 100644 (file)
@@ -35,7 +35,7 @@ static const struct suffix_mult tail_suffixes[] = {
 
 struct globals {
        bool status;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 
 static void tail_xprint_header(const char *fmt, const char *filename)
index ea019c27c3aebb0a2e8090435ca7939e3bdf9ac6..2854a539cfa331b985148d81bfad6ccd95ded7d5 100644 (file)
@@ -36,7 +36,7 @@ struct globals {
        char **names;
        int    cur;
        char  *cmd[1];
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define names (G.names)
 #define cur   (G.cur  )
index 10da8dce42a13ee2c317a4583cabfbf8b81e008a..dfc72f01a90ad6738403117d4e97047d40e3808e 100644 (file)
@@ -96,7 +96,7 @@ struct globals {
        char *pidfile;
        int user_id;
        smallint signal_nr;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define found             (G.found               )
 #define userspec          (G.userspec            )
index bc8b0dad13672ebb0350de0559e31203184dde71..a6f3f55f709e232acdd15355db302bfefd75c796 100644 (file)
@@ -444,7 +444,7 @@ struct globals2 {
 
        /* biggest and least used members go last */
        tsplitter fsplitter, rsplitter;
-};
+}; //FIX_ALIASING; - large code growth
 #define G1 (ptr_to_globals[-1])
 #define G (*(struct globals2 *)ptr_to_globals)
 /* For debug. nm --size-sort awk.o | grep -vi ' [tr] ' */
index fd9dd1be6fcceb6723a2b98b86be1c007b1404e4..e5e187725324b711162b29ca1b679b8ecc1fccb3 100644 (file)
@@ -117,7 +117,7 @@ struct globals {
                int idx;        /* Space used */
                int len;        /* Space allocated */
        } pipeline;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 void BUG_sed_globals_too_big(void);
 #define INIT_G() do { \
index b417123f6f60828e8730f0955434305be0175b55..4bc3b38dc68a0922505b59b3e388f5c1f2f1df97 100644 (file)
@@ -104,7 +104,7 @@ struct globals {
        action ***actions;
        bool need_print;
        recurse_flags_t recurse_flags;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { \
        struct G_sizecheck { \
index 193b48c1130e980696554eccb9d032f5a598dce6..a321cc31bfd05b3f581a37029393988d9adfcbe4 100644 (file)
@@ -111,7 +111,7 @@ struct globals {
        /* globals used internally */
        llist_t *pattern_head;   /* growable list of patterns to match */
        const char *cur_file;    /* the current file we are reading */
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { \
        struct G_sizecheck { \
index b58b14936f23390d742f166b09ab2feec93dd34f..ab4402e79cb85e86de867c873e865a0ffd72868e 100644 (file)
 # define EXTERNALLY_VISIBLE
 #endif
 
+/* At 4.4 gcc become much more anal about this, need to use "aliased" types */
+#if __GNUC_PREREQ(4,4)
+# define FIX_ALIASING __attribute__((__may_alias__))
+#else
+# define FIX_ALIASING
+#endif
+
 /* We use __extension__ in some places to suppress -pedantic warnings
    about GCC extensions.  This feature didn't work properly before
    gcc 2.8.  */
index 7135e4475a0b506223fa19d7dd7a61dbe39993ad..ebd48121d619144fe07c7c7cf352963ed28b820b 100644 (file)
@@ -94,7 +94,7 @@ struct globals {
        char *env_var_user;
        char *env_var_home;
 #endif
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define LogLevel           (G.LogLevel               )
 #define LogFile            (G.LogFile                )
index 7348ed349d140e615d1c0ce8cdc4b2a17dad0fa5..cb4b1e9b1ab847fa42e453652d5e5deab889d2c3 100644 (file)
@@ -13,7 +13,7 @@ struct globals {
        unsigned pointer;
        unsigned base;
        double stack[1];
-};
+} FIX_ALIASING;
 enum { STACK_SIZE = (COMMON_BUFSIZE - offsetof(struct globals, stack)) / sizeof(double) };
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define pointer   (G.pointer   )
index 399b77a4a6db56820cc039a09794d7a65ff4cedd..9738620fd86cb80b5971bec9d4d686613a70de6a 100644 (file)
@@ -315,7 +315,7 @@ struct globals {
 #ifdef DO_FLUSHCACHE
        unsigned char flushcache[4] = { WIN_FLUSHCACHE, 0, 0, 0 };
 #endif
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 struct BUG_G_too_big {
        char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
index f339fbdbedf274aa911e419fe260dd884ef97454..292f2df22e518432b0786789e63fb02bb9e49389 100644 (file)
@@ -70,7 +70,7 @@ struct globals {
        int num_unresolved_deps;
        /* bool. "Did we have 'symbol:FOO' requested on cmdline?" */
        smallint need_symbols;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { } while (0)
 
index 442e80f2fc96c0ce658825bb873278f7b456fc70..05c1bf2b2ce4b9264dbd45f643e0d8e2d4191537 100644 (file)
@@ -3203,6 +3203,7 @@ static int obj_create_image(struct obj_file *f, char *image)
 
 static struct obj_file *obj_load(char *image, size_t image_size, int loadprogbits)
 {
+       typedef uint32_t aliased_uint32_t FIX_ALIASING;
 #if BB_LITTLE_ENDIAN
 # define ELFMAG_U32 ((uint32_t)(ELFMAG0 + 0x100 * (ELFMAG1 + (0x100 * (ELFMAG2 + 0x100 * ELFMAG3)))))
 #else
@@ -3224,7 +3225,7 @@ static struct obj_file *obj_load(char *image, size_t image_size, int loadprogbit
                bb_error_msg_and_die("error while loading ELF header");
        memcpy(&f->header, image, sizeof(f->header));
 
-       if (*(uint32_t*)(&f->header.e_ident) != ELFMAG_U32) {
+       if (*(aliased_uint32_t*)(&f->header.e_ident) != ELFMAG_U32) {
                bb_error_msg_and_die("not an ELF file");
        }
        if (f->header.e_ident[EI_CLASS] != ELFCLASSM
index 278f2dc9a3b04d7fda86beeedd244ab1000d05f5..0ef267a35c90bcd319f035b5a705481afa1d98d8 100644 (file)
@@ -51,7 +51,7 @@ struct globals {
        const char *device;      /* current device */
        smallint hw_set;         /* flag if hw-type was set (-H) */
 
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define ap         (G.ap        )
 #define hw         (G.hw        )
index e3418a9459bbe0a781b0fbaa38a91ff6db7cabcf..effe418a6eb6e116a8198e6f534a9f464fdefebc 100644 (file)
@@ -45,7 +45,7 @@ struct globals {
        unsigned received;
        unsigned brd_recv;
        unsigned req_recv;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define src        (G.src       )
 #define dst        (G.dst       )
index b7d5b20b19b2c6c1a69113a140396e004b34ea42..186ff50cebf9c90d1e602bbf3818bf4952e39688 100644 (file)
@@ -106,7 +106,7 @@ struct globals {
        /* We need these aligned to uint32_t */
        char msg_ok [(sizeof("NNN " MSG_OK ) + 3) & 0xfffc];
        char msg_err[(sizeof("NNN " MSG_ERR) + 3) & 0xfffc];
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { \
        /* Moved to main */ \
index 2dd7e92328b0e7a1e1e6455e6b9977216fceb425..120ccff83d33dedb4b7dadc56cf8bd082b38dce3 100644 (file)
@@ -23,7 +23,7 @@ struct globals {
        int verbose_flag;
        int do_continue;
        char buf[1]; /* actually [BUFSZ] */
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) };
 struct BUG_G_too_big {
index 51b36263f5ca8af8e68e4d098eb3b9730b239968..bf88b1c19bfdf95713c526011ce0e1fbed5f76ef 100644 (file)
@@ -106,7 +106,7 @@ enum {
 struct globals {
        char **my_environ;
        const char *startup_PATH;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { } while (0)
 
index a45573396af776ed1d17a6d9e9d07db36a38ed2d..7aa6b7b19372fa4d7a2f79f6e6f1037030d9fdfb 100644 (file)
@@ -313,7 +313,7 @@ struct globals {
        fd_set allsock;
        /* Used in next_line(), and as scratch read buffer */
        char line[256];          /* _at least_ 256, see LINE_SIZE */
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 enum { LINE_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line) };
 struct BUG_G_too_big {
index 23b39f2e2dd59f6f68bc0d09a09313e86ac1afda..467b7f6940fb3c97f68880953ce749f81b4f28d8 100644 (file)
@@ -263,7 +263,7 @@ struct globals {
 #endif
        } pingaddr;
        char rcvd_tbl[MAX_DUP_CHK / 8];
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define pingsock     (G.pingsock    )
 #define if_index     (G.if_index    )
index d3212bb40d845b9f23c086256c4036a44f73320c..12a3067de219ad277f823c623282775f67d0efd8 100644 (file)
@@ -20,7 +20,7 @@ struct globals {
        int handle;
        int saved_disc;
        struct termios saved_state;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define handle       (G.handle      )
 #define saved_disc   (G.saved_disc  )
index 541a0f8f4789cc9bed7b971edafdbdeaab303335..6a5a8504f12fad2399d484965aec826ec8f6b4a4 100644 (file)
@@ -43,8 +43,7 @@ struct globals {
        __u32 filter_parent;
        __u32 filter_prio;
        __u32 filter_proto;
-};
-
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define filter_ifindex (G.filter_ifindex)
 #define filter_qdisc (G.filter_qdisc)
index d0db33b79fbef81031b26662449065ee1975aae3..42845df0eec446e9b2608d1896510219b667e627 100644 (file)
@@ -50,7 +50,7 @@ struct globals {
        unsigned cmax;
        char **env_cur;
        char *env_var[1]; /* actually bigger */
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define verbose      (G.verbose     )
 #define max_per_host (G.max_per_host)
index 013d959a177ba260b121760e0aba88eb503149b3..344bb0daaaa8e95fb766aad5f76ab8a4f5875e04 100644 (file)
@@ -75,7 +75,7 @@ struct globals {
        char    iacbuf[IACBUFSIZE];
        struct termios termios_def;
        struct termios termios_raw;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { \
        struct G_sizecheck { \
index b0a1cc4d8632a71d6713aa967f98b411827b4c9c..dd59de9d4980dd74405e8b34ee6670c8be24dc29 100644 (file)
@@ -60,7 +60,7 @@ struct globals {
        const char *loginpath;
        const char *issuefile;
        int maxfd;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { \
        G.loginpath = "/bin/login"; \
index b2c3c033c283e4b02f8906ff50bc40b8158cb374..0e5b48d40914acb14fb7c9746596a0c192d23ad2 100644 (file)
@@ -90,7 +90,7 @@ struct globals {
        const char *file;
        bb_progress_t pmt;
 #endif
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 struct BUG_G_too_big {
        char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
index ad1770b5803acb7a9b9a812b0fb3770936b7a5a0..9d813dcc2a3361bfc305d4f374ca1900f169d3c5 100644 (file)
@@ -30,7 +30,7 @@ struct globals {
 #endif
        smallint chunked;         /* chunked transfer encoding */
        smallint got_clen;        /* got content-length: from server  */
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 struct BUG_G_too_big {
        char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
index a4da5cbcd3666c6f9f8f89a7ae97c9db81a4f8bd..db10d0a26c7d11cbcc912fb17cddd6126b8870df 100644 (file)
@@ -77,7 +77,7 @@ enum {
 struct globals {
        struct sockaddr saddr;
        struct ether_addr eth_addr;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define saddr    (G.saddr   )
 #define eth_addr (G.eth_addr)
index 0b674ffb452d9e46c96fa480d5615b363ea106ca..91ebd6819cc1ec67acd2e5fa9e29c35fb1c1b307 100644 (file)
@@ -49,7 +49,7 @@ struct globals {
        unsigned long long seconds_since_boot;
 #endif
        char default_o[sizeof(DEFAULT_O_STR)];
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define out                (G.out               )
 #define out_cnt            (G.out_cnt           )
index f514df78a9c7ed54436720eff88a3d7caa799c95..d76d9af780a20110364f17f407795ef238c9f1bf 100644 (file)
@@ -100,10 +100,8 @@ struct globals {
        int num_cpus;
 #endif
        char line_buf[80];
-};
-
+}; //FIX_ALIASING; - large code growth
 enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) };
-
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define INIT_G() do { \
        struct G_sizecheck { \
index 48b83960df3a99afaa6ddfe07804feefe8c655f1..5b221e90ae4e51617af8198937d85aeeed29040f 100644 (file)
@@ -95,7 +95,7 @@ struct globals {
        struct fd_pair logpipe;
        char *dir;
        struct svdir svd[2];
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define haslog       (G.haslog      )
 #define sigterm      (G.sigterm     )
index f6aaeb7d48c8cce2423a0e1b0e076e907b9cf081..71fde757e0b0f61c7a783e78cea4f2924bd093f0 100644 (file)
@@ -58,7 +58,7 @@ struct globals {
        struct pollfd pfd[1];
        unsigned stamplog;
 #endif
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define sv          (G.sv          )
 #define svdir       (G.svdir       )
index 96ebb749d41d2a906a5070cceb77da6e73cfff4b..3f76a2d476c0d5c1105a65824d9ef787b0674dd9 100644 (file)
@@ -165,7 +165,7 @@ struct globals {
 /* "Bernstein" time format: unix + 0x400000000000000aULL */
        uint64_t tstart, tnow;
        svstatus_t svstatus;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define acts         (G.acts        )
 #define service      (G.service     )
index f556c7db541f0cccdbe1f353deefbeb3414ae743..fc8b4abb9ea52f9473c3d65a5ec3effdc915e3a6 100644 (file)
@@ -184,7 +184,7 @@ struct globals {
 
        sigset_t blocked_sigset;
 };
-#define G (*(struct globals*)ptr_to_globals)
+#define G (*ptr_to_globals)
 #define dir            (G.dir           )
 #define verbose        (G.verbose       )
 #define linemax        (G.linemax       )
index 4686d80424567b790ae79b9595bef4731b500c63..f45e41b2b465144f364d47c2f0612c58c3843aa7 100644 (file)
@@ -35,8 +35,7 @@ struct globals {
        dev_t dev_id; /* Device id where target file exists */
        int nerr;
        struct edir excludeArray[MAX_EXCLUDES];
-};
-
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 void BUG_setfiles_globals_too_big(void);
 #define INIT_G() do { \
index 932bbecbba830200fe2e138d09db97519aa8442b..1e8d6bcc04b140904a4b6012203a648c51fbd980 100644 (file)
@@ -34,7 +34,7 @@ struct globals {
        struct sembuf SMrup[1]; // {0, -1, IPC_NOWAIT | SEM_UNDO},
        struct sembuf SMrdn[2]; // {1, 0}, {0, +1, SEM_UNDO}
        struct shbuf_ds *shbuf;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define SMrup (G.SMrup)
 #define SMrdn (G.SMrdn)
index feece99200675399f5493cb7c1890ba24e798dea..970f5f79fd042e1c2ea9743efbbe0eeb4673392d 100644 (file)
@@ -157,7 +157,6 @@ struct globals {
        /* File-name data */
        char current_name[MAX_DEPTH * MINIX_NAME_MAX];
 };
-
 #define G (*ptr_to_globals)
 #if ENABLE_FEATURE_MINIX2
 #define version2           (G.version2           )
index 80549d1b7c98d0193f6697506ce04130177ec92b..69e1e6937bd3949d14e780a0bd45aee5eeff16c7 100644 (file)
@@ -64,7 +64,7 @@
 struct globals {
        int root_major, root_minor;
        char *subsystem;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define root_major (G.root_major)
 #define root_minor (G.root_minor)
index 076b40057e7f841c8b098dd661297e7e2a4fa43c..55694e434936cb097fd958efe6632a3163d4aca7 100644 (file)
@@ -22,7 +22,7 @@ struct globals {
        int cin_fileno;
        struct termios initial_settings;
        struct termios new_settings;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)bb_common_bufsiz1)
 #define INIT_G() ((void)0)
 #define initial_settings (G.initial_settings)
index 23a3459311bb6d35cdfffffa0b11840339cee7e9..0bad597709eea48f1ee401c2ee149eb8f820f470 100644 (file)
@@ -268,7 +268,7 @@ struct globals {
        llist_t *fslist;
        char getmntent_buf[1];
 
-};
+} FIX_ALIASING;
 enum { GETMNTENT_BUFSIZE = COMMON_BUFSIZE - offsetof(struct globals, getmntent_buf) };
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define nfs_mount_version (G.nfs_mount_version)
index 33ad00ac13c8a3f4bab6f33850b54bd9c805bce7..f647a32bccee762d92f7a611153298414a632f3b 100644 (file)
@@ -20,7 +20,7 @@
 #if ENABLE_FEATURE_SWAPON_PRI
 struct globals {
        int flags;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define g_flags (G.flags)
 #else