From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- .../nss/nss/disable-Wvarargs-with-clang.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 external/meta-openembedded/meta-oe/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch (limited to 'external/meta-openembedded/meta-oe/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch') diff --git a/external/meta-openembedded/meta-oe/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch b/external/meta-openembedded/meta-oe/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch new file mode 100644 index 00000000..de812d27 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch @@ -0,0 +1,33 @@ +clang 3.9 add this warning to rightly flag undefined +behavior, we relegate this to be just a warning instead +of error and keep the behavior as it was. Right fix would +be to not pass enum to the function with variadic arguments +as last named argument + +Fixes errors like +ocsp.c:2220:22: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] + va_start(ap, responseType0); + ^ +ocsp.c:2200:43: note: parameter of type 'SECOidTag' is declared here + SECOidTag responseType0, ...) + +see +https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start +for more details + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +Index: nss-3.37.1/nss/coreconf/Werror.mk +=================================================================== +--- nss-3.37.1.orig/nss/coreconf/Werror.mk ++++ nss-3.37.1/nss/coreconf/Werror.mk +@@ -56,7 +56,7 @@ ifndef WARNING_CFLAGS + ifdef CC_IS_CLANG + # -Qunused-arguments : clang objects to arguments that it doesn't understand + # and fixing this would require rearchitecture +- WARNING_CFLAGS += -Qunused-arguments ++ WARNING_CFLAGS += -Qunused-arguments -Wno-error=varargs + # -Wno-parentheses-equality : because clang warns about macro expansions + WARNING_CFLAGS += $(call disable_warning,parentheses-equality) + ifdef BUILD_OPT -- cgit 1.2.3-korg