Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang: -Wunsafe-buffer-usage #252

Merged
merged 10 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nanoprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ NPF_VISIBILITY int npf_vpprintf(
#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic"
#pragma GCC diagnostic ignored "-Wcovered-switch-default"
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
#ifndef __APPLE__
#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
#endif
#elif NANOPRINTF_GCC_PAST_4_6
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
Expand Down
1 change: 1 addition & 0 deletions tests/conformance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#pragma GCC diagnostic ignored "-Wold-style-cast"
#ifndef __APPLE__
#pragma GCC diagnostic ignored "-Wreserved-identifier"
#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
#endif
#endif
#pragma GCC diagnostic ignored "-Wformat"
Expand Down
4 changes: 4 additions & 0 deletions tests/doctest_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
#pragma warning(disable:5264) // unused const variable
#endif

#if defined(__clang__) && !defined(__APPLE__)
#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
#endif

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
2 changes: 1 addition & 1 deletion tests/mpaland-conformance
Submodule mpaland-conformance updated 1 files
+1 −0 paland.cc
1 change: 1 addition & 0 deletions tests/unit_nanoprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic"
#ifndef __APPLE__
#pragma GCC diagnostic ignored "-Wreserved-identifier"
#pragma GCC diagnostic ignored "-Wunsafe-buffer-usage"
#endif
#endif
#endif
Expand Down