diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-08-22 13:43:15 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-08-22 13:43:15 -0700 |
commit | d8fd4be8d734203197e888ada6e14128fc5d53da (patch) | |
tree | cb8263a5b022b3873a89ad2b02f6bbb7d17292fe /src | |
parent | 2894bfec6b2c24a86639336053b27eae77ecab1a (diff) | |
download | tmwa-d8fd4be8d734203197e888ada6e14128fc5d53da.tar.gz tmwa-d8fd4be8d734203197e888ada6e14128fc5d53da.tar.bz2 tmwa-d8fd4be8d734203197e888ada6e14128fc5d53da.tar.xz tmwa-d8fd4be8d734203197e888ada6e14128fc5d53da.zip |
Don't break gcc < 4.8 with warnings on
Diffstat (limited to 'src')
-rw-r--r-- | src/common/socket.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 19e9eb4..4655d1d 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -207,7 +207,9 @@ int make_listen_port(uint16_t port) server_address.sin_family = AF_INET; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" +#if __GNUC__ > 4 || __GNUC_MINOR__ >= 8 #pragma GCC diagnostic ignored "-Wuseless-cast" +#endif server_address.sin_addr.s_addr = htonl(INADDR_ANY); server_address.sin_port = htons(port); #pragma GCC diagnostic pop @@ -265,7 +267,9 @@ int make_connection(uint32_t ip, uint16_t port) server_address.sin_addr.s_addr = ip; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" +#if __GNUC__ > 4 || __GNUC_MINOR__ >= 8 #pragma GCC diagnostic ignored "-Wuseless-cast" +#endif server_address.sin_port = htons(port); #pragma GCC diagnostic pop |