mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-21 22:00:49 +00:00
btrfs-progs: updated and add missing function attributes to the definition
Reported by sparse. Make the prototype match the definition and put the attributes before the function. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
b4b069dcb2
commit
628307f5c4
@ -190,7 +190,7 @@ static int write_extent_content(struct btrfs_fs_info *fs_info, int out_fd,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void print_usage(void) __attribute__((noreturn));
|
||||
__attribute__((noreturn))
|
||||
static void print_usage(void)
|
||||
{
|
||||
printf("usage: btrfs-map-logical [options] device\n");
|
||||
|
3
help.c
3
help.c
@ -218,6 +218,7 @@ void usage_command(const struct cmd_struct *cmd, int full, int err)
|
||||
usage_command_usagestr(cmd->usagestr, cmd->token, full, err);
|
||||
}
|
||||
|
||||
__attribute__((noreturn))
|
||||
void usage(const char * const *usagestr)
|
||||
{
|
||||
usage_command_usagestr(usagestr, NULL, 1, 1);
|
||||
@ -325,6 +326,7 @@ void usage_command_group(const struct cmd_group *grp, int full, int err)
|
||||
fprintf(outf, "%s\n", grp->infostr);
|
||||
}
|
||||
|
||||
__attribute__((noreturn))
|
||||
void help_unknown_token(const char *arg, const struct cmd_group *grp)
|
||||
{
|
||||
fprintf(stderr, "%s: unknown token '%s'\n", get_argv0_buf(), arg);
|
||||
@ -332,6 +334,7 @@ void help_unknown_token(const char *arg, const struct cmd_group *grp)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
__attribute__((noreturn))
|
||||
void help_ambiguous_token(const char *arg, const struct cmd_group *grp)
|
||||
{
|
||||
const struct cmd_struct *cmd = grp->commands;
|
||||
|
9
help.h
9
help.h
@ -55,13 +55,16 @@
|
||||
struct cmd_struct;
|
||||
struct cmd_group;
|
||||
|
||||
void usage(const char * const *usagestr) __attribute__((noreturn));
|
||||
__attribute__((noreturn))
|
||||
void usage(const char * const *usagestr);
|
||||
void usage_command(const struct cmd_struct *cmd, int full, int err);
|
||||
void usage_command_group(const struct cmd_group *grp, int all, int err);
|
||||
void usage_command_group_short(const struct cmd_group *grp);
|
||||
|
||||
void help_unknown_token(const char *arg, const struct cmd_group *grp) __attribute__((noreturn));
|
||||
void help_ambiguous_token(const char *arg, const struct cmd_group *grp) __attribute__((noreturn));
|
||||
__attribute__((noreturn))
|
||||
void help_unknown_token(const char *arg, const struct cmd_group *grp);
|
||||
__attribute__((noreturn))
|
||||
void help_ambiguous_token(const char *arg, const struct cmd_group *grp);
|
||||
|
||||
void help_command_group(const struct cmd_group *grp, int argc, char **argv);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user