Skip to contentSkip to conversation

libsepol: Drop unused assignment

PATCH In review Petr Lautrbach 2 participants 3 messages Jun 7, 2022 – Jun 15, 2022 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsepol: Drop unused assignment

Fixes:
cil/src/cil_build_ast.c:4622:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read

---
 libsepol/cil/src/cil_build_ast.c | 1 -
 1 file changed, 1 deletion(-)
libsepol/cil/src/cil_build_ast.c +0 -1
index 26fa79069b96..4177c9f6778c 100644
@@ -4619,7 +4619,6 @@ int cil_gen_genfscon(struct cil_db *db, struct cil_tree_node *parse_current, str
 			} else {
 				cil_log(CIL_ERR, "Invalid file type \"%s\"\n", file_type);
 			}
-			rc = SEPOL_ERR;
 			goto exit;
 		}
 		context_node = parse_current->next->next->next->next;
Signature · 1 line
2.36.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Petr Lautrbach

Fixes:
cil/src/cil_build_ast.c:4622:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read

Quoted 19 lines
---
 libsepol/cil/src/cil_build_ast.c | 1 -
 1 file changed, 1 deletion(-)
libsepol/cil/src/cil_build_ast.c +0 -2
index 26fa79069b96..4177c9f6778c 100644
@@ -4619,7 +4619,6 @@ int cil_gen_genfscon(struct cil_db *db, struct cil_tree_node *parse_current, str
                        } else {
                                cil_log(CIL_ERR, "Invalid file type \"%s\"\n", file_type);
                        }
-                       rc = SEPOL_ERR;
                        goto exit;
                }
                context_node = parse_current->next->next->next->next;
--

2.36.1

#2 lore raw
Quoted 10 lines · James Carter
Quoted 5 lines · Petr Lautrbach

Fixes:
cil/src/cil_build_ast.c:4622:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read

Merged.
Thanks,
Jim

Quoted 19 lines
Quoted 19 lines
---
 libsepol/cil/src/cil_build_ast.c | 1 -
 1 file changed, 1 deletion(-)
libsepol/cil/src/cil_build_ast.c +0 -2
index 26fa79069b96..4177c9f6778c 100644
@@ -4619,7 +4619,6 @@ int cil_gen_genfscon(struct cil_db *db, struct cil_tree_node *parse_current, str
                        } else {
                                cil_log(CIL_ERR, "Invalid file type \"%s\"\n", file_type);
                        }
-                       rc = SEPOL_ERR;
                        goto exit;
                }
                context_node = parse_current->next->next->next->next;
--

2.36.1