Skip to content

Commit 5b2617c

Browse files
asjkdave
authored andcommitted
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 <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent ae7e864 commit 5b2617c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmds/inspect.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ struct list_chunks_ctx {
730730
struct list_chunks_entry *stats;
731731
};
732732

733-
int cmp_cse_devid_start(const void *va, const void *vb)
733+
static int cmp_cse_devid_start(const void *va, const void *vb)
734734
{
735735
const struct list_chunks_entry *a = va;
736736
const struct list_chunks_entry *b = vb;
@@ -751,7 +751,7 @@ int cmp_cse_devid_start(const void *va, const void *vb)
751751
return 1;
752752
}
753753

754-
int cmp_cse_devid_lstart(const void *va, const void *vb)
754+
static int cmp_cse_devid_lstart(const void *va, const void *vb)
755755
{
756756
const struct list_chunks_entry *a = va;
757757
const struct list_chunks_entry *b = vb;
@@ -772,8 +772,8 @@ int cmp_cse_devid_lstart(const void *va, const void *vb)
772772
return 1;
773773
}
774774

775-
int print_list_chunks(struct list_chunks_ctx *ctx, unsigned sort_mode,
776-
unsigned unit_mode, bool with_usage, bool with_empty)
775+
static int print_list_chunks(struct list_chunks_ctx *ctx, unsigned sort_mode,
776+
unsigned unit_mode, bool with_usage, bool with_empty)
777777
{
778778
u64 devid;
779779
struct list_chunks_entry e;

0 commit comments

Comments
 (0)