Skip to content

Commit 8897f1e

Browse files
committed
Add GCC 4.6 version restriction for "#pragma GCC diagnostic".
1 parent 023ffd2 commit 8897f1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/OVAL/probes/SEAP/MurmurHash3.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ void MurmurHash3_x86_32 ( const void * key, int len,
127127

128128
uint32_t k1 = 0;
129129

130+
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
130131
#pragma GCC diagnostic push
131132
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
132133
switch(len & 3)
@@ -137,6 +138,7 @@ void MurmurHash3_x86_32 ( const void * key, int len,
137138
k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
138139
};
139140
#pragma GCC diagnostic pop
141+
#endif
140142

141143
//----------
142144
// finalization
@@ -205,6 +207,7 @@ void MurmurHash3_x86_128 ( const void * key, const int len,
205207
uint32_t k3 = 0;
206208
uint32_t k4 = 0;
207209

210+
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
208211
#pragma GCC diagnostic push
209212
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
210213
switch(len & 15)
@@ -233,6 +236,7 @@ void MurmurHash3_x86_128 ( const void * key, const int len,
233236
k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
234237
};
235238
#pragma GCC diagnostic pop
239+
#endif
236240

237241
//----------
238242
// finalization
@@ -297,6 +301,7 @@ void MurmurHash3_x64_128 ( const void * key, const int len,
297301
uint64_t k1 = 0;
298302
uint64_t k2 = 0;
299303

304+
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
300305
#pragma GCC diagnostic push
301306
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
302307
switch(len & 15)
@@ -321,6 +326,7 @@ void MurmurHash3_x64_128 ( const void * key, const int len,
321326
k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1;
322327
};
323328
#pragma GCC diagnostic pop
329+
#endif
324330

325331
//----------
326332
// finalization

0 commit comments

Comments
 (0)