Skip to content

Commit

Permalink
Disable -Wstringop-overflow in sds.c
Browse files Browse the repository at this point in the history
Spurious warning with GCC 11 on Red Hat UBI 9.2
  • Loading branch information
nicolasff committed Nov 5, 2023
1 parent 60e92f6 commit 84123f5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/hiredis/sds.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif

#include "fmacros.h"
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -1287,3 +1292,7 @@ int main(void) {
return sdsTest();
}
#endif

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

0 comments on commit 84123f5

Please sign in to comment.