btrfs-progs: inspect: fix warnings reported by -Wmissing-prototypes
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 <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f16be8eeb7
commit
96de5b014f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue