🐞 fix(warning as error): fix unused parameter warning

This commit is contained in:
yangwei
2024-08-07 13:34:56 +08:00
committed by luwenpeng
parent f1b3928c70
commit 6bb5c44ee3
12 changed files with 36 additions and 14 deletions

View File

@@ -442,11 +442,15 @@ void __rb_erase_color(struct rb_node *parent, struct rb_root *root,
* We use dummy augmented callbacks here, and have the compiler optimize them
* out of the rb_insert_color() and rb_erase() function definitions.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
static inline void dummy_propagate(struct rb_node *node, struct rb_node *stop) {}
static inline void dummy_copy(struct rb_node *old, struct rb_node *new_node) {}
static inline void dummy_rotate(struct rb_node *old, struct rb_node *new_node) {}
#pragma GCC diagnostic pop
static const struct rb_augment_callbacks dummy_callbacks = {
.propagate = dummy_propagate,
.copy = dummy_copy,