build: Fixing and suppressing all warnings
clang generates a number of harmless warnings originated from cryptopp
library.
Change-Id: I676e7b6d60588867f55a2ce1cd88ef263c3e38df
diff --git a/src/security/certificate/certificate-extension.cpp b/src/security/certificate/certificate-extension.cpp
index 51c29ed..e2636db 100644
--- a/src/security/certificate/certificate-extension.cpp
+++ b/src/security/certificate/certificate-extension.cpp
@@ -6,6 +6,19 @@
* See COPYING for copyright and distribution information.
*/
+#if __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreorder"
+#pragma clang diagnostic ignored "-Wtautological-compare"
+#pragma clang diagnostic ignored "-Wunused-variable"
+#pragma clang diagnostic ignored "-Wunused-function"
+#elif __GNUC__
+#pragma GCC diagnostic ignored "-Wreorder"
+#pragma GCC diagnostic ignored "-Wtautological-compare"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
#include <ndn-cpp/security/certificate/certificate-extension.hpp>
#include <cryptopp/asn.h>
diff --git a/src/security/certificate/certificate-subject-description.cpp b/src/security/certificate/certificate-subject-description.cpp
index 472b30e..c91cb6a 100644
--- a/src/security/certificate/certificate-subject-description.cpp
+++ b/src/security/certificate/certificate-subject-description.cpp
@@ -6,6 +6,19 @@
* See COPYING for copyright and distribution information.
*/
+#if __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreorder"
+#pragma clang diagnostic ignored "-Wtautological-compare"
+#pragma clang diagnostic ignored "-Wunused-variable"
+#pragma clang diagnostic ignored "-Wunused-function"
+#elif __GNUC__
+#pragma GCC diagnostic ignored "-Wreorder"
+#pragma GCC diagnostic ignored "-Wtautological-compare"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
#include <ndn-cpp/security/certificate/certificate-subject-description.hpp>
#include <cryptopp/asn.h>
diff --git a/src/security/certificate/certificate.cpp b/src/security/certificate/certificate.cpp
index 414785d..73827a3 100644
--- a/src/security/certificate/certificate.cpp
+++ b/src/security/certificate/certificate.cpp
@@ -6,23 +6,24 @@
* See COPYING for copyright and distribution information.
*/
+#if __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreorder"
+#pragma clang diagnostic ignored "-Wtautological-compare"
+#pragma clang diagnostic ignored "-Wunused-variable"
+#pragma clang diagnostic ignored "-Wunused-function"
+#elif __GNUC__
+#pragma GCC diagnostic ignored "-Wreorder"
+#pragma GCC diagnostic ignored "-Wtautological-compare"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
#include <ndn-cpp/common.hpp>
#include <ndn-cpp/security/certificate/certificate.hpp>
-#if NDN_CPP_USE_SYSTEM_BOOST
-#include <boost/iostreams/stream.hpp>
-#include <boost/iostreams/device/array.hpp>
-namespace ndnboost = boost;
-#else
-// We can use ndnboost::iostreams because this is internal and will not conflict with the application if it uses boost::iostreams.
-#include <ndnboost/iostreams/stream.hpp>
-#include <ndnboost/iostreams/device/array.hpp>
-#endif
-
#include "../../util/logging.hpp"
-// #include "../../util/blob-stream.hpp"
-// #include <ndn-cpp/security/certificate/certificate.hpp>
#include "../../util/time.hpp"
#include <cryptopp/asn.h>
diff --git a/src/security/certificate/public-key.cpp b/src/security/certificate/public-key.cpp
index 205dcd2..6666783 100644
--- a/src/security/certificate/public-key.cpp
+++ b/src/security/certificate/public-key.cpp
@@ -6,19 +6,22 @@
* See COPYING for copyright and distribution information.
*/
+#if __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreorder"
+#pragma clang diagnostic ignored "-Wtautological-compare"
+#pragma clang diagnostic ignored "-Wunused-variable"
+#pragma clang diagnostic ignored "-Wunused-function"
+#elif __GNUC__
+#pragma GCC diagnostic ignored "-Wreorder"
+#pragma GCC diagnostic ignored "-Wtautological-compare"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
+
#include <ndn-cpp/common.hpp>
#include <ndn-cpp/security/certificate/public-key.hpp>
-#if NDN_CPP_USE_SYSTEM_BOOST
-#include <boost/iostreams/stream.hpp>
-#include <boost/iostreams/device/array.hpp>
-namespace ndnboost = boost;
-#else
-// We can use ndnboost::iostreams because this is internal and will not conflict with the application if it uses boost::iostreams.
-#include <ndnboost/iostreams/stream.hpp>
-#include <ndnboost/iostreams/device/array.hpp>
-#endif
-
#include <cryptopp/rsa.h>
#include <cryptopp/base64.h>
#include <cryptopp/files.h>