mirror of
https://github.com/curl/curl.git
synced 2026-08-12 18:51:00 +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
|
|
@ -220,6 +220,7 @@ static void main_free(struct GlobalConfig *config)
|
|||
#ifdef _UNICODE
|
||||
#if defined(__GNUC__)
|
||||
/* GCC doesn't know about wmain() */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
#pragma GCC diagnostic ignored "-Wmissing-declarations"
|
||||
#endif
|
||||
|
|
@ -287,4 +288,10 @@ int main(int argc, char *argv[])
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef _UNICODE
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* ndef UNITTESTS */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue