From 0a1eb42d8c54bada5ce60e77654f70c32bbc77a2 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 19 Sep 2020 12:53:07 +0200 Subject: Ignore depreciation warnings from internal use --- CMakeLists.txt | 2 +- NK_C_API.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5590835..db8d2fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,7 @@ set_target_properties(nitrokey PROPERTIES OPTION(ERROR_ON_WARNING "Stop compilation on warning found (not supported for MSVC)" OFF) if (NOT MSVC) - set(COMPILE_FLAGS "-Wall -Wno-unused-function -Wcast-qual -Woverloaded-virtual -Wsign-compare -Wformat -Wformat-security -Wno-deprecated") + set(COMPILE_FLAGS "-Wall -Wno-unused-function -Wcast-qual -Woverloaded-virtual -Wsign-compare -Wformat -Wformat-security") IF(NOT APPLE) if (ERROR_ON_WARNING) set(COMPILE_FLAGS "${COMPILE_FLAGS} -Werror") diff --git a/NK_C_API.cc b/NK_C_API.cc index 43eb980..c84e402 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -605,6 +605,8 @@ extern "C" { } // deprecated, noop on v0.51 and older (excl. v0.49) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" NK_C_API int NK_set_unencrypted_read_only(const char *user_pin) { auto m = NitrokeyManager::instance(); return get_without_result([&]() { @@ -619,6 +621,7 @@ extern "C" { m->set_unencrypted_read_write(user_pin); }); } +#pragma GCC diagnostic pop NK_C_API int NK_set_unencrypted_read_only_admin(const char *admin_pin) { auto m = NitrokeyManager::instance(); -- cgit v1.2.3