mirror of https://github.com/nirenjan/libx52.git
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
parent
a17312dcbc
commit
2fa9f52ddb
|
|
@ -27,7 +27,7 @@ bool x52d_client_register(int client_fd[X52D_MAX_CLIENTS], int sock_fd)
|
||||||
int fd;
|
int fd;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(__clang__)
|
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 13
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
|
#pragma GCC diagnostic ignored "-Wanalyzer-fd-leak"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -45,7 +45,7 @@ bool x52d_client_register(int client_fd[X52D_MAX_CLIENTS], int sock_fd)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(__clang__)
|
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 13
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue