diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2017-02-01 12:02:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 12:02:50 +0300 |
commit | b5267219ddd327207128b3e311f29eac232c6dde (patch) | |
tree | 1672e02ca6d0caa73ffb0e73b998bda6e106726d /src/basic | |
parent | a38d90c672adf85cc3d164326efd26b361222f48 (diff) | |
parent | 6154d33de3f15bbd5d5df718103af9c37ba0a768 (diff) |
Merge pull request #5166 from keszybz/gcc7
Fixes for gcc 7 and new µhttpd & glibc warnings
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/MurmurHash2.c | 6 | ||||
-rw-r--r-- | src/basic/nss-util.h | 6 | ||||
-rw-r--r-- | src/basic/siphash24.c | 7 | ||||
-rw-r--r-- | src/basic/time-util.c | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/src/basic/MurmurHash2.c b/src/basic/MurmurHash2.c index 9020793930..a282a21201 100644 --- a/src/basic/MurmurHash2.c +++ b/src/basic/MurmurHash2.c @@ -69,9 +69,9 @@ uint32_t MurmurHash2 ( const void * key, int len, uint32_t seed ) switch(len) { - case 3: h ^= data[2] << 16; - case 2: h ^= data[1] << 8; - case 1: h ^= data[0]; + case 3: h ^= data[2] << 16; /* fall through */ + case 2: h ^= data[1] << 8; /* fall through */ + case 1: h ^= data[0]; /* fall through */ h *= m; }; diff --git a/src/basic/nss-util.h b/src/basic/nss-util.h index e7844fff96..9d927a8227 100644 --- a/src/basic/nss-util.h +++ b/src/basic/nss-util.h @@ -27,6 +27,10 @@ #define NSS_SIGNALS_BLOCK SIGALRM,SIGVTALRM,SIGPIPE,SIGCHLD,SIGTSTP,SIGIO,SIGHUP,SIGUSR1,SIGUSR2,SIGPROF,SIGURG,SIGWINCH +#ifndef DEPRECATED_RES_USE_INET6 +# define DEPRECATED_RES_USE_INET6 0x00002000 +#endif + #define NSS_GETHOSTBYNAME_PROTOTYPES(module) \ enum nss_status _nss_##module##_gethostbyname4_r( \ const char *name, \ @@ -92,7 +96,7 @@ enum nss_status _nss_##module##_gethostbyname_r( \ int *errnop, int *h_errnop) { \ enum nss_status ret = NSS_STATUS_NOTFOUND; \ \ - if (_res.options & RES_USE_INET6) \ + if (_res.options & DEPRECATED_RES_USE_INET6) \ ret = _nss_##module##_gethostbyname3_r( \ name, \ AF_INET6, \ diff --git a/src/basic/siphash24.c b/src/basic/siphash24.c index 8c1cdc3db6..4bb41786c8 100644 --- a/src/basic/siphash24.c +++ b/src/basic/siphash24.c @@ -127,18 +127,25 @@ void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) { switch (left) { case 7: state->padding |= ((uint64_t) in[6]) << 48; + /* fall through */ case 6: state->padding |= ((uint64_t) in[5]) << 40; + /* fall through */ case 5: state->padding |= ((uint64_t) in[4]) << 32; + /* fall through */ case 4: state->padding |= ((uint64_t) in[3]) << 24; + /* fall through */ case 3: state->padding |= ((uint64_t) in[2]) << 16; + /* fall through */ case 2: state->padding |= ((uint64_t) in[1]) << 8; + /* fall through */ case 1: state->padding |= ((uint64_t) in[0]); + /* fall through */ case 0: break; } diff --git a/src/basic/time-util.c b/src/basic/time-util.c index 7a5b29d77e..1310c76336 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -1271,7 +1271,7 @@ bool clock_supported(clockid_t clock) { if (!clock_boottime_supported()) return false; - /* fall through, after checking the cached value for CLOCK_BOOTTIME. */ + /* fall through */ default: /* For everything else, check properly */ |