From aaa9a6700f98a62386fcdcb8e89cab884d616c5d Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sat, 3 Dec 2022 21:09:42 -0500 Subject: [PATCH] Cleanup: zhack should not declare function prototypes in main() Instead, it should include the proper header. CodeQL caught this. Reviewed-by: Damian Szuberski Reviewed-by: Alexander Motin Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Signed-off-by: Richard Yao Closes #14263 --- cmd/zhack.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/zhack.c b/cmd/zhack.c index a1063ab147..0b6da31ec5 100644 --- a/cmd/zhack.c +++ b/cmd/zhack.c @@ -30,6 +30,7 @@ * result in corrupted pools. */ +#include #include #include #include @@ -646,8 +647,6 @@ zhack_do_label(int argc, char **argv) int main(int argc, char **argv) { - extern void zfs_prop_init(void); - char *path[MAX_NUM_PATHS]; const char *subcommand; int rv = 0;