Skip to content

Commit

Permalink
libusb.h: Avoid UNREFERENCED_PARAMETER on GCC/clang
Browse files Browse the repository at this point in the history
It interferes with -Wuninitialized on recent clang.

Fixes libusb#1381

Signed-off-by: Tormod Volden <[email protected]>
  • Loading branch information
tormodvolden committed Dec 15, 2023
1 parent 87d6686 commit 9c24371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libusb/libusbi.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
#endif

/* The following is used to silence warnings for unused variables */
#if defined(UNREFERENCED_PARAMETER)
#if defined(UNREFERENCED_PARAMETER) && !defined(__GNUC__)
#define UNUSED(var) UNREFERENCED_PARAMETER(var)
#else
#define UNUSED(var) do { (void)(var); } while(0)
Expand Down

0 comments on commit 9c24371

Please sign in to comment.