SunOS openindiana 5.11 illumos-
de27825976 i86pc i386 i86pc
clang version 17.0.6 (https://github.com/OpenIndiana/oi-userland.git
e8024d02bcf37929f39ab5d7ba1a689029e42ba8)
Target: x86_64-pc-solaris2.11
Thread model: posix
InstalledDir: /usr/bin
In file included from ./sslutils.c:42:
In file included from ./sslutils.h:38:
In file included from /usr/openssl/1.0/include/openssl/ssl.h:156:
In file included from /usr/openssl/1.0/include/openssl/x509.h:87:
/usr/openssl/1.0/include/openssl/ecdsa.h:295:14: error: parameter
'flags' not found in the function declaration
[-Werror,-Wdocumentation]
/usr/openssl/1.0/include/openssl/ecdsa.h:301:14: error: parameter
'ecdsa_method' not found in the function declaration
[-Werror,-Wdocumentation]
/usr/openssl/1.0/include/openssl/ecdsa.h:302:14: error: parameter
'name' not found in the function declaration
[-Werror,-Wdocumentation]
Add a pair of diagnostic control macros for -Wdocumentation and use it
around including OpenSSL headers.
#define DIAG_ON_STRICT_PROTOTYPES \
PCAP_DO_PRAGMA(clang diagnostic pop)
#endif
+
+ #define DIAG_OFF_DOCUMENTATION \
+ PCAP_DO_PRAGMA(clang diagnostic push) \
+ PCAP_DO_PRAGMA(clang diagnostic ignored "-Wdocumentation")
+ #define DIAG_ON_DOCUMENTATION \
+ PCAP_DO_PRAGMA(clang diagnostic pop)
#elif defined(_MSC_VER)
/*
* This is Microsoft Visual Studio; we can use __pragma(warning(disable:XXXX))
#ifndef DIAG_ON_STRICT_PROTOTYPES
#define DIAG_ON_STRICT_PROTOTYPES
#endif
+#ifndef DIAG_OFF_DOCUMENTATION
+#define DIAG_OFF_DOCUMENTATION
+#endif
+#ifndef DIAG_ON_DOCUMENTATION
+#define DIAG_ON_DOCUMENTATION
+#endif
#ifndef PCAP_UNREACHABLE
#define PCAP_UNREACHABLE
#endif
#ifdef HAVE_OPENSSL
#include "pcap/socket.h" // for PCAP_SOCKET
+// If this is OpenSSL 1.0, at least one header may trigger a -Wdocumentation
+// in Clang, which should not be a problem of this header or a file that
+// includes it.
+#include "diag-control.h"
+DIAG_OFF_DOCUMENTATION
#include <openssl/ssl.h>
#include <openssl/err.h>
+DIAG_ON_DOCUMENTATION
/*
* Utility functions