mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Rework how we avoid clang's -Wunused-function
The previous technique to avoid this was to have explicit (void)(wuffs_foo__bar_baz); no-op lines of code. However, on MSVC, this triggers warning C4551 "function call missing argument list". https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4551 says that "A function call must include the open and close parentheses". But this is not a function call, it is casting the function pointer. This false positive is a bug in MSVC, but we work around it for Wuffs.
This commit is contained in:
1 parent
0e3d691048
commit
ed52fdecb9
11 files changed
+51
-594
No files matched your search
@@ -65,20 +65,3 @@ wuffs_base__range_ie_u64__get_max_excl(const wuffs_base__range_ie_u64* r) {
|
||||
#define wuffs_base__utility__make_rect_ii_u32 wuffs_base__make_rect_ii_u32
|
||||
#define wuffs_base__utility__make_rect_ie_u32 wuffs_base__make_rect_ie_u32
|
||||
|
||||
// ---------------- Bureaucracy re -Wunused-function
|
||||
|
||||
static inline void
|
||||
wuffs_base__acknowledge_potentially_unused_functions__range_private()
|
||||
WUFFS_BASE__POTENTIALLY_UNUSED;
|
||||
|
||||
static inline void
|
||||
wuffs_base__acknowledge_potentially_unused_functions__range_private() {
|
||||
(void)(wuffs_base__range_ie_u32__get_max_excl);
|
||||
(void)(wuffs_base__range_ie_u32__get_min_incl);
|
||||
(void)(wuffs_base__range_ie_u64__get_max_excl);
|
||||
(void)(wuffs_base__range_ie_u64__get_min_incl);
|
||||
(void)(wuffs_base__range_ii_u32__get_max_incl);
|
||||
(void)(wuffs_base__range_ii_u32__get_min_incl);
|
||||
(void)(wuffs_base__range_ii_u64__get_max_incl);
|
||||
(void)(wuffs_base__range_ii_u64__get_min_incl);
|
||||
}
|
||||
Reference in new issue
Block a user