commit d0204e4c20f0aa7792092f6ff42727f90740c473 Author: Dimitry Andric Date: Tue Sep 14 23:30:40 2021 +0200 misc/rump: fix or suppress clang 13 warnings diff --git a/misc/rump/Makefile b/misc/rump/Makefile index 800233ef0741..e86b2179f52e 100644 --- a/misc/rump/Makefile +++ b/misc/rump/Makefile @@ -19,6 +19,7 @@ GH_PROJECT= buildrump.sh GH_TAGNAME= b914579 GH_TUPLE= rumpkernel:src-netbsd:82f3a69:netbsd/src USE_LDCONFIG= yes +USES= compiler .include @@ -28,10 +29,13 @@ PLIST_SUB+= X8664="" PLIST_SUB+= X8664="@comment " .endif -CFLAGS+= -Wno-address-of-packed-member +CWARNFLAGS+= -Wno-address-of-packed-member +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 130 +CWARNFLAGS+= -Wno-unused-but-set-variable +.endif do-build: - cd ${WRKSRC}; ${SETENV} CC=${CC} AR=${AR} NM=${NM} OBJCOPY=${OBJCOPY} ./buildrump.sh -F CFLAGS="${CFLAGS}" -r fullbuild + cd ${WRKSRC}; ${SETENV} CC=${CC} AR=${AR} NM=${NM} OBJCOPY=${OBJCOPY} ./buildrump.sh -F CFLAGS="${CFLAGS}" -F CWARNFLAGS="${CWARNFLAGS}" -r fullbuild do-install: cd ${WRKSRC}/rump; ${PAX} -wr lib include ${STAGEDIR}${PREFIX}/ diff --git a/misc/rump/files/patch-src_sys_crypto_nist__ctr__drbg_nist__ctr__drbg.c b/misc/rump/files/patch-src_sys_crypto_nist__ctr__drbg_nist__ctr__drbg.c new file mode 100644 index 000000000000..197b981cebeb --- /dev/null +++ b/misc/rump/files/patch-src_sys_crypto_nist__ctr__drbg_nist__ctr__drbg.c @@ -0,0 +1,11 @@ +--- src/sys/crypto/nist_ctr_drbg/nist_ctr_drbg.c.orig 2016-08-02 11:51:10 UTC ++++ src/sys/crypto/nist_ctr_drbg/nist_ctr_drbg.c +@@ -153,7 +153,7 @@ typedef struct { + static inline int + check_int_alignment(const void *p) + { +- intptr_t ip = (const char *)p - (const char *)0; ++ intptr_t ip = (intptr_t)p; + + if (ip & (sizeof(int) - 1)) + return 0;