Skip to content

Commit

Permalink
Clean up warnings that can use the _unused macro
Browse files Browse the repository at this point in the history
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
  • Loading branch information
heroxbd authored and williamh committed Jan 4, 2017
1 parent 92325b4 commit c304522
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/librc/librc-misc.c
Expand Up @@ -19,6 +19,7 @@

#include "queue.h"
#include "librc.h"
#include "helpers.h"

bool
rc_yesno(const char *value)
Expand Down Expand Up @@ -118,7 +119,7 @@ rc_getline(char **line, size_t *len, FILE *fp)
librc_hidden_def(rc_getline)

char *
rc_proc_getent(const char *ent)
rc_proc_getent(const char *ent _unused)
{
#ifdef __linux__
FILE *fp;
Expand Down
5 changes: 3 additions & 2 deletions src/librc/librc.c
Expand Up @@ -19,6 +19,7 @@ const char librc_copyright[] = "Copyright (c) 2007-2008 Roy Marples";

#include "queue.h"
#include "librc.h"
#include <helpers.h>
#ifdef __FreeBSD__
# include <sys/sysctl.h>
#endif
Expand Down Expand Up @@ -232,7 +233,7 @@ detect_prefix(const char *systype)
}

static const char *
detect_container(const char *systype)
detect_container(const char *systype _unused)
{
#ifdef __FreeBSD__
if (systype) {
Expand Down Expand Up @@ -296,7 +297,7 @@ detect_container(const char *systype)
}

static const char *
detect_vm(const char *systype)
detect_vm(const char *systype _unused)
{
#ifdef __NetBSD__
if (systype) {
Expand Down
5 changes: 4 additions & 1 deletion src/rc/start-stop-daemon.c
Expand Up @@ -64,6 +64,7 @@ static struct pam_conv conv = { NULL, NULL};
#include "rc.h"
#include "rc-misc.h"
#include "_usage.h"
#include "helpers.h"

const char *applet = NULL;
const char *extraopts = NULL;
Expand Down Expand Up @@ -153,7 +154,9 @@ extern char **environ;
# define SYS_ioprio_set __NR_ioprio_set
#endif
#if !defined(__DragonFly__)
static inline int ioprio_set(int which, int who, int ioprio)
static inline int ioprio_set(int which _unused,
int who _unused,
int ioprio _unused)
{
#ifdef SYS_ioprio_set
return syscall(SYS_ioprio_set, which, who, ioprio);
Expand Down
4 changes: 3 additions & 1 deletion src/rc/supervise-daemon.c
Expand Up @@ -62,6 +62,7 @@ static struct pam_conv conv = { NULL, NULL};
#include "rc.h"
#include "rc-misc.h"
#include "_usage.h"
#include "helpers.h"

const char *applet = NULL;
const char *extraopts = NULL;
Expand Down Expand Up @@ -124,7 +125,8 @@ extern char **environ;
# define SYS_ioprio_set __NR_ioprio_set
#endif
#if !defined(__DragonFly__)
static inline int ioprio_set(int which, int who, int ioprio)
static inline int ioprio_set(int which _unused, int who _unused,
int ioprio _unused)
{
#ifdef SYS_ioprio_set
return syscall(SYS_ioprio_set, which, who, ioprio);
Expand Down

0 comments on commit c304522

Please sign in to comment.