btrfs-progs: fix -Wmissing-noreturn

Signed-off-by: "Chris West (Faux)" <git@goeswhere.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
Chris West (Faux) 2013-09-09 23:06:38 +01:00 committed by Chris Mason
parent 8892d54442
commit cddbab982d
5 changed files with 9 additions and 3 deletions

View File

@ -142,6 +142,7 @@ struct mdrestore_struct {
struct btrfs_fs_info *info;
};
static void print_usage(void) __attribute__((noreturn));
static int search_for_chunk_blocks(struct mdrestore_struct *mdres,
u64 search, u64 cluster_bytenr);
static struct extent_buffer *alloc_dummy_eb(u64 bytenr, u32 size);

View File

@ -90,6 +90,7 @@ static struct extent_buffer * debug_read_block(struct btrfs_root *root,
return eb;
}
static void print_usage(void) __attribute__((noreturn));
static void print_usage(void)
{
fprintf(stderr, "usage: btrfs-map-logical [options] device\n");

View File

@ -32,6 +32,7 @@
#include "version.h"
#include "utils.h"
static void print_usage(void) __attribute__((noreturn));
static void print_usage(void)
{
fprintf(stderr, "usage: btrfs-zero-log dev\n");

View File

@ -72,12 +72,12 @@ int handle_command_group(const struct cmd_group *grp, int argc,
/* help.c */
extern const char * const generic_cmd_help_usage[];
void usage(const char * const *usagestr);
void usage(const char * const *usagestr) __attribute__((noreturn));
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 help_unknown_token(const char *arg, const struct cmd_group *grp);
void help_ambiguous_token(const char *arg, 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));
void help_command_group(const struct cmd_group *grp, int argc, char **argv);

3
mkfs.c
View File

@ -264,6 +264,8 @@ static int create_data_reloc_tree(struct btrfs_trans_handle *trans,
return 0;
}
static void print_usage(void) __attribute__((noreturn));
static void print_usage(void)
{
fprintf(stderr, "usage: mkfs.btrfs [options] dev [ dev ... ]\n");
@ -286,6 +288,7 @@ static void print_usage(void)
exit(1);
}
static void print_version(void) __attribute__((noreturn));
static void print_version(void)
{
fprintf(stderr, "mkfs.btrfs, part of %s\n", BTRFS_BUILD_VERSION);