AaronBallman wrote: > Is it expected that this warns for C code? I only see `cxx` in this change > but I see a new instance of this warning in my Linux kernel builds: > > ``` > drivers/net/ethernet/netronome/nfp/nfdk/rings.c:60:18: warning: first > argument in call to '__builtin_memset' is a pointer to non-trivially copyable > type 'struct nfp_nfd3_tx_desc' [-Wnontrivial-memaccess] > 60 | memset(tx_ring->txds, 0, tx_ring->size); > | ^ > drivers/net/ethernet/netronome/nfp/nfdk/rings.c:60:18: note: explicitly cast > the pointer to silence this warning > 60 | memset(tx_ring->txds, 0, tx_ring->size); > | ^ > | (void*) > include/linux/fortify-string.h:512:46: note: expanded from macro 'memset' > 512 | #define memset(p, c, s) __fortify_memset_chk(p, c, s, > \ > | ^ > include/linux/fortify-string.h:504:22: note: expanded from macro > '__fortify_memset_chk' > 504 | __underlying_memset(p, c, __fortify_size); > \ > | ^ > 1 warning generated. > ``` > > https://elixir.bootlin.com/linux/v6.11.5/source/drivers/net/ethernet/netronome/nfp/nfdk/rings.c#L60
I would not expect this diagnostic in C code, that seems like a bug to me. @serge-sans-paille can you take care of that? https://github.com/llvm/llvm-project/pull/111434 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits