File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed
Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 7474#define NODISCARD __attribute__((warn_unused_result))
7575#endif
7676
77+ /**
78+ * Mark a function or variable as potentially unused to suppress compiler warnings.
79+ */
80+ #if defined(__GNUC__ ) || defined(__clang__ )
81+ #define RBS_ATTRIBUTE_UNUSED __attribute__((unused))
82+ #else
83+ #define RBS_ATTRIBUTE_UNUSED
84+ #endif
85+
7786#endif
Original file line number Diff line number Diff line change 66#ifndef RBS_RBS_ENCODING_H
77#define RBS_RBS_ENCODING_H
88
9+ #include "rbs/defines.h"
10+
911#include <assert.h>
1012#include <stdbool.h>
1113#include <stddef.h>
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ next_power_of_two(uint32_t v) {
3737 return v ;
3838}
3939
40- __attribute__(( unused )) static bool is_power_of_two (uint32_t size ) {
40+ RBS_ATTRIBUTE_UNUSED static bool is_power_of_two (uint32_t size ) {
4141 return (size & (size - 1 )) == 0 ;
4242}
4343
Original file line number Diff line number Diff line change 33
44#include <ctype.h>
55
6- #if defined(__GNUC__ )
7- #define RBS_ATTRIBUTE_UNUSED __attribute__((unused))
8- #else
9- #define RBS_ATTRIBUTE_UNUSED
10- #endif
11-
126typedef uint32_t rbs_unicode_codepoint_t ;
137
148#define UNICODE_ALPHA_CODEPOINTS_LENGTH 1450
You can’t perform that action at this time.
0 commit comments