Add -Wextra-semi -Wundefined-func-template to the default CXXFLAGS

And fix the resulting compilation errors.

Change-Id: I16f679836a0cf2a3ff5dfcf6f6b67bfbfe4cdbd7
Refs: #4248
diff --git a/src/security/detail/openssl.hpp b/src/security/detail/openssl.hpp
index cde9efc..99d20cb 100644
--- a/src/security/detail/openssl.hpp
+++ b/src/security/detail/openssl.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -22,15 +22,11 @@
 #ifndef NDN_SECURITY_DETAIL_OPENSSL_HPP
 #define NDN_SECURITY_DETAIL_OPENSSL_HPP
 
-// suppress deprecation warnings in OSX >= 10.7
-
-#if defined(__APPLE__)
-
-#ifdef __clang__
+// suppress deprecation warnings on macOS >= 10.7
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
-#endif // __clang__
-
-#endif // __APPLE__
+#endif
 
 #include <openssl/bio.h>
 #include <openssl/crypto.h>
@@ -43,4 +39,8 @@
 #include <openssl/rsa.h>
 #include <openssl/x509.h>
 
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
 #endif // NDN_SECURITY_DETAIL_OPENSSL_HPP