Skip to content

Commit 2269962

Browse files
committed
tests: subsys: usb: bos: Disable erroneous clang warning
tests/subsys/usb/bos/src/test_bos.c:24:22: error: variable 'dummy_descriptor' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static const uint8_t dummy_descriptor[] = { ^ Signed-off-by: Tom Hughes <[email protected]>
1 parent 89ba122 commit 2269962

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/subsys/usb/bos/src/test_bos.c

+3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ LOG_MODULE_REGISTER(test_main, LOG_LEVEL_DBG);
2121
* Compare old style USB BOS definition with section aligned
2222
*/
2323

24+
/* Disable erroneous clang warning: https://github.com/llvm/llvm-project/issues/25458. */
25+
TOOLCHAIN_DISABLE_CLANG_WARNING(TOOLCHAIN_WARNING_UNNEEDED_INTERNAL_DECLARATION)
2426
static const uint8_t dummy_descriptor[] = {
2527
0x00, 0x01, 0x02
2628
};
29+
TOOLCHAIN_ENABLE_CLANG_WARNING(TOOLCHAIN_WARNING_UNNEEDED_INTERNAL_DECLARATION)
2730

2831
static struct webusb_bos_desc {
2932
struct usb_bos_descriptor bos;

0 commit comments

Comments
 (0)