diff options
author | Amar Tumballi <amar@gluster.com> | 2011-06-08 23:37:46 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-06-16 09:15:33 -0700 |
commit | a7a2b8218958579006778b1200a0e40125291e0f (patch) | |
tree | 61218fc536f77f8d68afa12874b5b47fee208397 /libglusterfs | |
parent | e719518e561033af0ffd07d0c8ad7d777715fe89 (diff) |
build warning fixes
mainly fixes all the sockaddr related 'strict aliasing' warnings
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2550 (build warnings)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2550
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/common-utils.h | 7 | ||||
-rw-r--r-- | libglusterfs/src/run.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index e092288bf5e..e42945bf03c 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -147,6 +147,13 @@ extern char *gf_mgmt_list[GF_MGMT_MAXVALUE]; } while (0); #endif +union gf_sock_union { + struct sockaddr_storage storage; + struct sockaddr_in6 sin6; + struct sockaddr_in sin; + struct sockaddr sa; +}; + #define GF_HIDDEN_PATH ".glusterfs" static inline void diff --git a/libglusterfs/src/run.c b/libglusterfs/src/run.c index 052a2fdb5a9..41601209c4e 100644 --- a/libglusterfs/src/run.c +++ b/libglusterfs/src/run.c @@ -312,7 +312,7 @@ runner_start (runner_t *runner) execvp (runner->argv[0], runner->argv); } - write (xpi[1], &errno, sizeof (errno)); + ret = write (xpi[1], &errno, sizeof (errno)); _exit (1); } |