mirror of
https://gitlab.isc.org/isc-projects/kea.git
synced 2025-12-20 00:53:34 +08:00
[#3451] Add check for Wdeprecate-literal-operator
This commit is contained in:
@@ -100,6 +100,9 @@
|
||||
/* Version number of package */
|
||||
#mesondefine VERSION
|
||||
|
||||
/* Whether the compiler supports flag -Wdeprecated-literal-operator */
|
||||
#mesondefine WDEPRECATED_LITERAL_OPERATOR_FLAG_SUPPORTED
|
||||
|
||||
/* Compile with Botan crypto */
|
||||
#mesondefine WITH_BOTAN
|
||||
|
||||
|
||||
@@ -691,6 +691,9 @@ if cxx_id == 'clang' and cpp_args_opt.length() == 0
|
||||
compile_args += '-Qunused-arguments'
|
||||
no_warnings += ['-Wno-unused-variable', '-Wno-unused-parameter']
|
||||
endif
|
||||
if cpp.has_argument('-Wdeprecated-literal-operator')
|
||||
conf_data.set('WDEPRECATED_LITERAL_OPERATOR_FLAG_SUPPORTED', 'yes')
|
||||
endif
|
||||
if werror_opt
|
||||
warnings += no_warnings
|
||||
endif
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef WDEPRECATED_LITERAL_OPERATOR_FLAG_SUPPORTED
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-literal-operator"
|
||||
#endif
|
||||
// #include <sysrepo-cpp/Changes.hpp> // Will be required on newer sysrepo-cpp
|
||||
#include <sysrepo-cpp/Session.hpp>
|
||||
// #include <sysrepo-cpp/Subscription.hpp> // Will be required on newer sysrepo-cpp
|
||||
#ifdef __GNUC__
|
||||
#ifdef WDEPRECATED_LITERAL_OPERATOR_FLAG_SUPPORTED
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#include <cc/data.h>
|
||||
#include <yang/netconf_error.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef WDEPRECATED_LITERAL_OPERATOR_FLAG_SUPPORTED
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-literal-operator"
|
||||
#endif
|
||||
#include <sysrepo-cpp/Connection.hpp>
|
||||
#include <sysrepo-cpp/Enum.hpp>
|
||||
#include <sysrepo-cpp/Session.hpp>
|
||||
#ifdef __GNUC__
|
||||
#ifdef WDEPRECATED_LITERAL_OPERATOR_FLAG_SUPPORTED
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user