From 96de5b014f8b11e636798896e7ade1c7b8ad0f0d Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Wed, 10 May 2023 22:01:10 +0800 Subject: [PATCH] btrfs-progs: inspect: fix warnings reported by -Wmissing-prototypes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling on a system with gcc 12.2.1, the following warning is generated. It can be fixed by adding a static storage class specifier. cmds/inspect.c:733:5: warning: no previous prototype for ‘cmp_cse_devid_start’ [-Wmissing-prototypes] 733 | int cmp_cse_devid_start(const void *va, const void *vb) | ^~~~~~~~~~~~~~~~~~~ cmds/inspect.c:754:5: warning: no previous prototype for ‘cmp_cse_devid_lstart’ [-Wmissing-prototypes] 754 | int cmp_cse_devid_lstart(const void *va, const void *vb) | ^~~~~~~~~~~~~~~~~~~~ cmds/inspect.c:775:5: warning: no previous prototype for ‘print_list_chunks’ [-Wmissing-prototypes] 775 | int print_list_chunks(struct list_chunks_ctx *ctx, unsigned sort_mode, | ^~~~~~~~~~~~~~~~~ Signed-off-by: Anand Jain Signed-off-by: David Sterba --- cmds/inspect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmds/inspect.c b/cmds/inspect.c index 5623f991..117efb51 100644 --- a/cmds/inspect.c +++ b/cmds/inspect.c @@ -730,7 +730,7 @@ struct list_chunks_ctx { struct list_chunks_entry *stats; }; -int cmp_cse_devid_start(const void *va, const void *vb) +static int cmp_cse_devid_start(const void *va, const void *vb) { const struct list_chunks_entry *a = va; const struct list_chunks_entry *b = vb; @@ -751,7 +751,7 @@ int cmp_cse_devid_start(const void *va, const void *vb) return 1; } -int cmp_cse_devid_lstart(const void *va, const void *vb) +static int cmp_cse_devid_lstart(const void *va, const void *vb) { const struct list_chunks_entry *a = va; const struct list_chunks_entry *b = vb; @@ -772,8 +772,8 @@ int cmp_cse_devid_lstart(const void *va, const void *vb) return 1; } -int print_list_chunks(struct list_chunks_ctx *ctx, unsigned sort_mode, - unsigned unit_mode, bool with_usage, bool with_empty) +static int print_list_chunks(struct list_chunks_ctx *ctx, unsigned sort_mode, + unsigned unit_mode, bool with_usage, bool with_empty) { u64 devid; struct list_chunks_entry e;