misc: just eliminate several 'unused' warning messages

[ plus we also play catch up on some earlier changes ]
[ that impacted skill.c, after using --enable-skill! ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2016-07-19 00:00:00 -05:00 committed by Craig Small
parent 634d115cca
commit 338166df57
6 changed files with 8 additions and 9 deletions

1
free.c
View File

@ -202,7 +202,6 @@ static void check_unit_set(int *unit_set)
int main(int argc, char **argv)
{
int c, flags = 0, unit_set = 0;
char *endptr;
struct commandline_arguments args;
struct procps_meminfo *mem_info = NULL;

View File

@ -188,8 +188,6 @@ PROCPS_EXPORT unsigned int procps_pid_length(void)
{
FILE *fp;
char pidbuf[24];
char *endp;
unsigned long int max_pid;
static int pid_length=0;
if (pid_length)

View File

@ -1216,8 +1216,10 @@ setREL1(LXCNAME)
static int pr_context(char *restrict const outbuf, const proc_t *restrict const pp){
static void (*ps_freecon)(char*) = 0;
static int (*ps_getpidcon)(pid_t pid, char **context) = 0;
#if ENABLE_LIBSELINUX
static int (*ps_is_selinux_enabled)(void) = 0;
static int tried_load = 0;
#endif
static int selinux_enabled = 0;
size_t len;
char *context;

View File

@ -236,7 +236,7 @@ static const char *format_parse(sf_node *sfn){
need_item=0;
}
} while (*++walk);
out:
if(!items){
free(buf);
goto empty;

View File

@ -172,6 +172,7 @@ void debug(int method, char *prog_name){
while(x); /* wait for debugger? */
}
#ifdef DEBUG
/************/
static void stack_trace_sigsegv(int signum){
(void)signum;
@ -179,7 +180,6 @@ static void stack_trace_sigsegv(int signum){
}
/************/
#ifdef DEBUG
void init_stack_trace(char *prog_name){
stored_prog_name = prog_name;
signal(SIGSEGV, stack_trace_sigsegv);

View File

@ -265,21 +265,21 @@ static void scan_procs(struct run_time_conf_t *run_time)
#define PIDS_GETINT(e) PROCPS_PIDS_VAL(EU_ ## e, s_int, reap->stacks[i])
#define PIDS_GETSTR(e) PROCPS_PIDS_VAL(EU_ ## e, str, reap->stacks[i])
struct procps_pidsinfo *info=NULL;
struct pids_reap *reap;
struct pids_fetch *reap;
int i, total_procs;
if (procps_pids_new(&info, 6, items) < 0)
if (procps_pids_new(&info, items, 6) < 0)
xerrx(EXIT_FAILURE,
_("Unable to create pid info structure"));
if ((reap = procps_pids_reap(info, PROCPS_FETCH_TASKS_ONLY)) == NULL)
xerrx(EXIT_FAILURE,
_("Unable to load process information"));
total_procs = reap->counts.total;
total_procs = reap->counts->total;
for (i=0; i < total_procs; i++) {
if (PIDS_GETINT(PID) == my_pid || PIDS_GETINT(PID) == 0)
continue;
if (uids && !match_intlist(PIDS_GETINT(EUID), uid_count, uids))
if (uids && !match_intlist(PIDS_GETINT(EUID), uid_count, (int *)uids))
continue;
if (ttys && !match_intlist(PIDS_GETINT(TTY), tty_count, ttys))
continue;