From: Khem Raj <[email protected]>

We are seeing warnigs with gcc-10 even on target builds e.g.

| In file included from nsinstall.c:20:
| /usr/include/unistd.h:520:14: note: in a call to function ‘getcwd’ declared 
with attribute ‘write_only (1, 2)’
|   520 | extern char *getcwd (char *__buf, size_t __size) __THROW __wur
|       |              ^~~~~~
| nsinstall.c:70:16: error: argument 1 is null but the corresponding size 
argument 2 value is 4096 [-Werror=nonnull]
|    70 | #define GETCWD getcwd
|       |                ^
| nsinstall.c:246:13: note: in expansion of macro ‘GETCWD’
|   246 |     todir = GETCWD(0, PATH_MAX);
|       |             ^~~~~~

Signed-off-by: Khem Raj <[email protected]>
---
 meta-oe/recipes-support/nss/nss_3.51.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/nss/nss_3.51.1.bb 
b/meta-oe/recipes-support/nss/nss_3.51.1.bb
index 3e3c3a3fd..348c2c13f 100644
--- a/meta-oe/recipes-support/nss/nss_3.51.1.bb
+++ b/meta-oe/recipes-support/nss/nss_3.51.1.bb
@@ -62,7 +62,6 @@ do_configure_prepend_libc-musl () {
 do_compile_prepend_class-native() {
     export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr
     export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
-    export NSS_ENABLE_WERROR=0
 }
 
 do_compile_prepend_class-nativesdk() {
@@ -76,6 +75,7 @@ do_compile_prepend_class-native() {
 
 do_compile() {
     export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr
+    export NSS_ENABLE_WERROR=0
 
     export CROSS_COMPILE=1
     export NATIVE_CC="${BUILD_CC}"
-- 
2.30.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#89683): 
https://lists.openembedded.org/g/openembedded-devel/message/89683
Mute This Topic: https://lists.openembedded.org/mt/80855023/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to