Since commit 67b410e80f09 ("libsepol/cil: Keep attributes used by generated attributes in neverallow rules") gcc reports the following warning when building libsepol: ../cil/src/cil_post.c: In function ‘__cil_post_db_neverallow_attr_helper’: ../cil/src/cil_post.c:1322:17: error: unused variable ‘db’ [-Werror=unused-variable] struct cil_db *db = extra_args; ^~ Signed-off-by: Nicolas Iooss <nicolas.iooss@xxxxxxx> --- libsepol/cil/src/cil_post.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c index ee693d47ca5f..3e013c97e219 100644 --- a/libsepol/cil/src/cil_post.c +++ b/libsepol/cil/src/cil_post.c @@ -1317,10 +1317,8 @@ static void __mark_neverallow_attrs(struct cil_list *expr_list) } } -static int __cil_post_db_neverallow_attr_helper(struct cil_tree_node *node, uint32_t *finished, void *extra_args) +static int __cil_post_db_neverallow_attr_helper(struct cil_tree_node *node, uint32_t *finished, __attribute__((unused)) void *extra_args) { - struct cil_db *db = extra_args; - switch (node->flavor) { case CIL_BLOCK: { struct cil_block *blk = node->data; -- 2.14.1