[libc-commits] [libc] [libc]: Add -Wextra for libc tests (PR #133643)

via libc-commits libc-commits at lists.llvm.org
Thu Jun 19 11:53:42 PDT 2025


================
@@ -17,11 +17,21 @@
 #include <stdbool.h> // bool in C
 
 #define STDBIT_STUB_FUNCTION(FUNC_NAME, LEADING_VAL)                           \
-  unsigned FUNC_NAME##_uc(unsigned char x) { return LEADING_VAL##AU; }         \
-  unsigned FUNC_NAME##_us(unsigned short x) { return LEADING_VAL##BU; }        \
-  unsigned FUNC_NAME##_ui(unsigned int x) { return LEADING_VAL##CU; }          \
-  unsigned FUNC_NAME##_ul(unsigned long x) { return LEADING_VAL##DU; }         \
-  unsigned FUNC_NAME##_ull(unsigned long long x) { return LEADING_VAL##EU; }
+  unsigned FUNC_NAME##_uc([[maybe_unused]] unsigned char x) {                  \
----------------
lntue wrote:

Can you also use `[[maybe_unused]]` for other files instead of `/*arg*/` for consistency?  Thanks,

https://github.com/llvm/llvm-project/pull/133643


More information about the libc-commits mailing list