diff options
author | David Sterba <dsterba@suse.com> | 2017-09-23 21:08:43 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-25 15:18:32 +0200 |
commit | 628307f5c4de32b282bef30eda7fc034d198c6d4 (patch) | |
tree | 14ece3dfd4d4ad11840922b281bb4e6ca6bdfe92 /help.c | |
parent | b4b069dcb22bd707775c3c649d77124ed006e39f (diff) |
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>
Diffstat (limited to 'help.c')
-rw-r--r-- | help.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |