selinux/*: -Wunused-parameter fixes

runsv: make it NOMMU-capable

function                                             old     new   delta
startservice                                         291     313     +22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 22/0)               Total: 22 bytes
This commit is contained in:
Denis Vlasenko
2008-03-17 09:19:26 +00:00
parent 4866e905d7
commit 592d4fe772
10 changed files with 52 additions and 38 deletions

View File

@@ -28,7 +28,11 @@ static char *type = NULL;
static char *range = NULL;
static char *specified_context = NULL;
static int change_filedir_context(const char *fname, struct stat *stbuf, void *userData, int depth)
static int change_filedir_context(
const char *fname,
struct stat *stbuf ATTRIBUTE_UNUSED,
void *userData ATTRIBUTE_UNUSED,
int depth ATTRIBUTE_UNUSED)
{
context_t context = NULL;
security_context_t file_context = NULL;
@@ -121,7 +125,7 @@ static const char chcon_longopts[] ALIGN1 =
#endif
int chcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int chcon_main(int argc, char **argv)
int chcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
{
char *reference_file;
char *fname;

View File

@@ -9,7 +9,7 @@
#include "libbb.h"
int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int getenforce_main(int argc, char **argv)
int getenforce_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
{
int rc;

View File

@@ -5,7 +5,7 @@
#include "libbb.h"
int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int load_policy_main(int argc, char **argv)
int load_policy_main(int argc, char **argv ATTRIBUTE_UNUSED)
{
int rc;

View File

@@ -30,7 +30,7 @@ static int print_matchpathcon(char *path, int noprint)
#define OPT_VERIFY (1<<4) /* -V */
int matchpathcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int matchpathcon_main(int argc, char **argv)
int matchpathcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
{
int error = 0;
unsigned opts;

View File

@@ -88,7 +88,7 @@ static const char runcon_longopts[] ALIGN1 =
#define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE)
int runcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int runcon_main(int argc, char **argv)
int runcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
{
char *role = NULL;
char *range = NULL;

View File

@@ -8,7 +8,7 @@
#include "libbb.h"
int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int selinuxenabled_main(int argc, char **argv)
int selinuxenabled_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
{
return !is_selinux_enabled();
}

View File

@@ -159,7 +159,7 @@ static void display_verbose(void)
}
int sestatus_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int sestatus_main(int argc, char **argv)
int sestatus_main(int argc ATTRIBUTE_UNUSED, char **argv)
{
unsigned opts;
const char *pol_path;

View File

@@ -99,7 +99,7 @@ enum {
#define FLAG_R (option_mask32 & OPT_R)
static void qprintf(const char *fmt, ...)
static void qprintf(const char *fmt ATTRIBUTE_UNUSED, ...)
{
/* quiet, do nothing */
}
@@ -391,8 +391,11 @@ static int restore(const char *file)
* This function is called by recursive_action on each file during
* the directory traversal.
*/
static int apply_spec(const char *file,
struct stat *sb, void *userData, int depth)
static int apply_spec(
const char *file,
struct stat *sb,
void *userData ATTRIBUTE_UNUSED,
int depth ATTRIBUTE_UNUSED)
{
if (!follow_mounts) {
/* setfiles does not process across different mount points */