Add __unused macros to appropriate places in order to allow building
with WARNS=6 on base gcc, gcc46, and clang Approved by: cperciva MFC after: 1 week
This commit is contained in:
parent
bf4ec4dfab
commit
41b8cbda7d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237260
@ -6,7 +6,6 @@ SRCS= mfiutil.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c mfi_flash.c \
|
||||
MAN8= mfiutil.8
|
||||
|
||||
CFLAGS+= -fno-builtin-strftime
|
||||
WARNS?=3
|
||||
|
||||
DPADD= ${LIBUTIL}
|
||||
LDADD= -lutil
|
||||
|
@ -152,7 +152,7 @@ mfi_config_lookup_volume(struct mfi_config_data *config, uint8_t target_id)
|
||||
}
|
||||
|
||||
static int
|
||||
clear_config(int ac, char **av)
|
||||
clear_config(int ac __unused, char **av __unused)
|
||||
{
|
||||
struct mfi_ld_list list;
|
||||
int ch, error, fd;
|
||||
@ -411,7 +411,7 @@ find_next_volume(struct config_id_state *state)
|
||||
|
||||
/* Populate an array with drives. */
|
||||
static void
|
||||
build_array(int fd, char *arrayp, struct array_info *array_info,
|
||||
build_array(int fd __unused, char *arrayp, struct array_info *array_info,
|
||||
struct config_id_state *state, int verbose)
|
||||
{
|
||||
struct mfi_array *ar = (struct mfi_array *)arrayp;
|
||||
|
@ -64,7 +64,7 @@ mfi_get_events(int fd, struct mfi_evt_list *list, int num_events,
|
||||
}
|
||||
|
||||
static int
|
||||
show_logstate(int ac, char **av)
|
||||
show_logstate(int ac, char **av __unused)
|
||||
{
|
||||
struct mfi_evt_log_state info;
|
||||
int error, fd;
|
||||
|
@ -75,7 +75,7 @@ patrol_get_props(int fd, struct mfi_pr_properties *prop)
|
||||
}
|
||||
|
||||
static int
|
||||
show_patrol(int ac, char **av)
|
||||
show_patrol(int ac __unused, char **av __unused)
|
||||
{
|
||||
struct mfi_pr_properties prop;
|
||||
struct mfi_pr_status status;
|
||||
@ -193,7 +193,7 @@ show_patrol(int ac, char **av)
|
||||
MFI_COMMAND(show, patrol, show_patrol);
|
||||
|
||||
static int
|
||||
start_patrol(int ac, char **av)
|
||||
start_patrol(int ac __unused, char **av __unused)
|
||||
{
|
||||
int error, fd;
|
||||
|
||||
@ -219,7 +219,7 @@ start_patrol(int ac, char **av)
|
||||
MFI_COMMAND(start, patrol, start_patrol);
|
||||
|
||||
static int
|
||||
stop_patrol(int ac, char **av)
|
||||
stop_patrol(int ac __unused, char **av __unused)
|
||||
{
|
||||
int error, fd;
|
||||
|
||||
|
@ -51,7 +51,7 @@ format_stripe(char *buf, size_t buflen, uint8_t stripe)
|
||||
}
|
||||
|
||||
static int
|
||||
show_adapter(int ac, char **av)
|
||||
show_adapter(int ac, char **av __unused)
|
||||
{
|
||||
struct mfi_ctrl_info info;
|
||||
char stripe[5];
|
||||
@ -136,7 +136,7 @@ show_adapter(int ac, char **av)
|
||||
MFI_COMMAND(show, adapter, show_adapter);
|
||||
|
||||
static int
|
||||
show_battery(int ac, char **av)
|
||||
show_battery(int ac, char **av __unused)
|
||||
{
|
||||
struct mfi_bbu_capacity_info cap;
|
||||
struct mfi_bbu_design_info design;
|
||||
@ -304,7 +304,7 @@ print_pd(struct mfi_pd_info *info, int state_len)
|
||||
}
|
||||
|
||||
static int
|
||||
show_config(int ac, char **av)
|
||||
show_config(int ac, char **av __unused)
|
||||
{
|
||||
struct mfi_config_data *config;
|
||||
struct mfi_array *ar;
|
||||
@ -410,7 +410,7 @@ show_config(int ac, char **av)
|
||||
MFI_COMMAND(show, config, show_config);
|
||||
|
||||
static int
|
||||
show_volumes(int ac, char **av)
|
||||
show_volumes(int ac, char **av __unused)
|
||||
{
|
||||
struct mfi_ld_list list;
|
||||
struct mfi_ld_info info;
|
||||
@ -493,7 +493,7 @@ show_volumes(int ac, char **av)
|
||||
MFI_COMMAND(show, volumes, show_volumes);
|
||||
|
||||
static int
|
||||
show_drives(int ac, char **av)
|
||||
show_drives(int ac, char **av __unused)
|
||||
{
|
||||
struct mfi_pd_list *list;
|
||||
struct mfi_pd_info info;
|
||||
@ -601,7 +601,7 @@ display_firmware(struct mfi_info_component *comp, const char *tag)
|
||||
}
|
||||
|
||||
static int
|
||||
show_firmware(int ac, char **av)
|
||||
show_firmware(int ac, char **av __unused)
|
||||
{
|
||||
struct mfi_ctrl_info info;
|
||||
struct mfi_info_component header;
|
||||
@ -657,7 +657,7 @@ show_firmware(int ac, char **av)
|
||||
MFI_COMMAND(show, firmware, show_firmware);
|
||||
|
||||
static int
|
||||
show_progress(int ac, char **av)
|
||||
show_progress(int ac, char **av __unused)
|
||||
{
|
||||
struct mfi_ld_list llist;
|
||||
struct mfi_pd_list *plist;
|
||||
|
@ -92,7 +92,7 @@ usage(void)
|
||||
}
|
||||
|
||||
static int
|
||||
version(int ac, char **av)
|
||||
version(int ac __unused, char **av __unused)
|
||||
{
|
||||
|
||||
printf("mfiutil version 1.0.14");
|
||||
|
Loading…
Reference in New Issue
Block a user