mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:23:31 +03:00
build: always revert #pragma GCC diagnostic after use
Before this patch some source files were overriding gcc warning options, but without restoring them at the end of the file. In CMake UNITY builds these options spilled over to the remainder of the source code, effecitvely disabling them for a larger portion of the codebase than intended. `#pragma clang diagnostic` didn't have such issue in the codebase. Reviewed-by: Marcel Raad Closes #12352
This commit is contained in:
parent
ab50027ddf
commit
a9fd0d0083
4 changed files with 24 additions and 0 deletions
|
|
@ -93,6 +93,7 @@
|
|||
#if defined(__GNUC__) && \
|
||||
(LIBSSH_VERSION_MINOR >= 10) || \
|
||||
(LIBSSH_VERSION_MAJOR > 0)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
|
|
@ -2946,4 +2947,10 @@ void Curl_ssh_version(char *buffer, size_t buflen)
|
|||
(void)msnprintf(buffer, buflen, "libssh/%s", ssh_version(0));
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && \
|
||||
(LIBSSH_VERSION_MINOR >= 10) || \
|
||||
(LIBSSH_VERSION_MAJOR > 0)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif /* USE_LIBSSH */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue