build: Fix the GCC pragma to only apply for GCC > 13

The -Wanalyzer-fd-leak flag was introduced in GCC 13, so this pragma
fails to build on older GCC versions.
pull/60/head
nirenjan 2026-03-09 00:26:06 -07:00
parent a17312dcbc
commit 2fa9f52ddb
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ bool x52d_client_register(int client_fd[X52D_MAX_CLIENTS], int sock_fd)
int fd;
int i;
#if defined(__GNUC__) && !defined(__clang__)
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 13
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
#endif
@ -45,7 +45,7 @@ bool x52d_client_register(int client_fd[X52D_MAX_CLIENTS], int sock_fd)
goto error;
}
#if defined(__GNUC__) && !defined(__clang__)
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 13
#pragma GCC diagnostic pop
#endif