libsemanage: drop the -no-unused-parameter build flag

Annote the couple of places they are needed and drop the flag

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Eric Paris 2011-06-24 16:43:10 -04:00
parent dad5f79991
commit d67b1ea1cb
6 changed files with 17 additions and 18 deletions

View File

@ -46,7 +46,7 @@ SRCS= $(filter-out $(SWIGGEN),$(wildcard *.c))
OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o
LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo
CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter
CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute
override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE

View File

@ -46,7 +46,7 @@ static int enter_ro(semanage_handle_t * handle, dbase_config_t * dconfig)
return STATUS_ERR;
}
static inline int exit_ro(semanage_handle_t * handle, dbase_config_t * dconfig)
static inline int exit_ro(semanage_handle_t * handle)
{
int commit_num = handle->funcs->get_serial(handle);
@ -129,11 +129,11 @@ int dbase_query(semanage_handle_t * handle,
return STATUS_ERR;
if (dconfig->dtable->query(handle, dconfig->dbase, key, response) < 0) {
exit_ro(handle, dconfig);
exit_ro(handle);
return STATUS_ERR;
}
return exit_ro(handle, dconfig);
return exit_ro(handle);
}
int dbase_exists(semanage_handle_t * handle,
@ -145,11 +145,11 @@ int dbase_exists(semanage_handle_t * handle,
return STATUS_ERR;
if (dconfig->dtable->exists(handle, dconfig->dbase, key, response) < 0) {
exit_ro(handle, dconfig);
exit_ro(handle);
return STATUS_ERR;
}
return exit_ro(handle, dconfig);
return exit_ro(handle);
}
int dbase_count(semanage_handle_t * handle,
@ -160,11 +160,11 @@ int dbase_count(semanage_handle_t * handle,
return STATUS_ERR;
if (dconfig->dtable->count(handle, dconfig->dbase, response) < 0) {
exit_ro(handle, dconfig);
exit_ro(handle);
return STATUS_ERR;
}
return exit_ro(handle, dconfig);
return exit_ro(handle);
}
int dbase_iterate(semanage_handle_t * handle,
@ -177,11 +177,11 @@ int dbase_iterate(semanage_handle_t * handle,
return STATUS_ERR;
if (dconfig->dtable->iterate(handle, dconfig->dbase, fn, fn_arg) < 0) {
exit_ro(handle, dconfig);
exit_ro(handle);
return STATUS_ERR;
}
return exit_ro(handle, dconfig);
return exit_ro(handle);
}
int dbase_list(semanage_handle_t * handle,
@ -193,9 +193,9 @@ int dbase_list(semanage_handle_t * handle,
return STATUS_ERR;
if (dconfig->dtable->list(handle, dconfig->dbase, records, count) < 0) {
exit_ro(handle, dconfig);
exit_ro(handle);
return STATUS_ERR;
}
return exit_ro(handle, dconfig);
return exit_ro(handle);
}

View File

@ -1545,7 +1545,7 @@ int semanage_direct_access_check(semanage_handle_t * sh)
if (semanage_check_init(polpath))
return -1;
return semanage_store_access_check(sh);
return semanage_store_access_check();
}
int semanage_direct_mls_enabled(semanage_handle_t * sh)

View File

@ -363,11 +363,10 @@ static semanage_list_t *get_home_dirs(genhomedircon_settings_t * s)
}
/**
* @param s settings structure, stores various paths etc. Must never be NULL
* @param out the FILE to put all the output in.
* @return 0 on success
*/
static int write_file_context_header(genhomedircon_settings_t * s, FILE * out)
static int write_file_context_header(FILE * out)
{
if (fprintf(out, COMMENT_FILE_CONTEXT_HEADER) < 0) {
return STATUS_ERR;
@ -880,7 +879,7 @@ static int write_context_file(genhomedircon_settings_t * s, FILE * out)
if (!homedir_context_tpl && !homeroot_context_tpl && !user_context_tpl)
goto done;
if (write_file_context_header(s, out) != STATUS_SUCCESS) {
if (write_file_context_header(out) != STATUS_SUCCESS) {
retval = STATUS_ERR;
goto done;
}

View File

@ -380,7 +380,7 @@ int semanage_create_store(semanage_handle_t * sh, int create)
* SEMANAGE_CAN_READ if the store can be read and the lock file used
* SEMANAGE_CAN_WRITE if the modules directory and binary policy dir can be written to
*/
int semanage_store_access_check(semanage_handle_t * sh)
int semanage_store_access_check(void)
{
const char *path;
int rc = -1;

View File

@ -75,7 +75,7 @@ extern const char *semanage_path(enum semanage_store_defs store,
int semanage_create_store(semanage_handle_t * sh, int create);
int semanage_store_access_check(semanage_handle_t * sh);
int semanage_store_access_check(void);
int semanage_remove_directory(const char *path);