chiark / gitweb /
Fix service file to match installed elogind binary location
[elogind.git] / src / basic / siphash24.c
index 8c1cdc3db6afd6bc8a1a13cfa0e05e5f24a5bc6e..e8b18dd16cd620a927e86b60c65ad832f40278aa 100644 (file)
@@ -68,6 +68,12 @@ void siphash24_init(struct siphash *state, const uint8_t k[16]) {
         };
 }
 
+#if 1 /// let's add a diagnostic push to silence -Wimplicit-fallthrough to elogind
+#  ifdef __GNUC__
+#    pragma GCC diagnostic push
+#    pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#  endif // __GNUC__
+#endif // 1
 void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
 
         const uint8_t *in = _in;
@@ -127,22 +133,34 @@ 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;
         }
 }
+#if 1 /// end diagnostic push in elogind
+#  ifdef __GNUC__
+#    pragma GCC diagnostic pop
+#  endif // __GNUC__
+#endif // 1
 
 uint64_t siphash24_finalize(struct siphash *state) {
         uint64_t b;