WARNS=4 fixes.

OK'ed by:	des
This commit is contained in:
Mark Murray 2002-01-20 17:54:33 +00:00
parent dd24e86e74
commit 73d7223603
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89587
8 changed files with 22 additions and 19 deletions

View File

@ -5,6 +5,7 @@
* All rights reserved.
*
* $Id: pam_delay.c,v 1.3 2001/01/22 06:07:28 agmorgan Exp $
* $FreeBSD$
*
*/
@ -133,7 +134,7 @@ void _pam_await_timer(pam_handle_t *pamh, int status)
int pam_fail_delay(pam_handle_t *pamh, unsigned int usec)
{
int largest;
unsigned int largest;
IF_NO_PAMH("pam_fail_delay", pamh, PAM_SYSTEM_ERR);

View File

@ -253,6 +253,7 @@ void _pam_parse_control(int *_control_array, char *_tok);
void _pam_system_log(int _priority, const char *_format, ... );
#define _PAM_SYSTEM_LOG_PREFIX "PAM "
int pam_authenticate_secondary(pam_handle_t *pamh, char *target_username, char *target_module_type, char *target_authn_domain, char *target_supp_data, unsigned char *target_module_authtok, int flags);
/*
* XXX - Take care with this. It could confuse the logic of a trailing
* else

View File

@ -3,6 +3,7 @@
* (based on XSSO draft spec of March 1997)
*
* $Id: pam_second.c,v 1.2 2000/12/04 19:02:34 baggins Exp $
* $FreeBSD$
*
*/
@ -14,12 +15,12 @@
/* p 42 */
int pam_authenticate_secondary(pam_handle_t *pamh,
char *target_username,
char *target_module_type,
char *target_authn_domain,
char *target_supp_data,
unsigned char *target_module_authtok,
int flags)
char *target_username __unused,
char *target_module_type __unused,
char *target_authn_domain __unused,
char *target_supp_data __unused,
unsigned char *target_module_authtok __unused,
int flags __unused)
{
int retval=PAM_SYSTEM_ERR;

View File

@ -21,7 +21,6 @@ SET_DECLARE(_pam_static_modules, struct pam_module);
/* Return pointer to data structure used to define a static module */
struct pam_module * _pam_open_static_handler(const char *path)
{
int i;
const char *clpath = path;
char *lpath, *end;
struct pam_module **static_module;

View File

@ -2,11 +2,12 @@
/*
* $Id: pam_strerror.c,v 1.2 2000/12/04 19:02:34 baggins Exp $
* $FreeBSD$
*/
#include "pam_private.h"
const char *pam_strerror(pam_handle_t *pamh, int errnum)
const char *pam_strerror(pam_handle_t *pamh __unused, int errnum)
{
#ifdef UGLY_HACK_FOR_PRIOR_BEHAVIOR_SUPPORT /* will be removed from v 1.0 */

View File

@ -54,7 +54,6 @@ extern char **pam_misc_drop_env(char **env);
extern int pam_misc_setenv(pam_handle_t *pamh, const char *name
, const char *value, int readonly);
#endif
char *xstrdup(const char *x);
#endif

View File

@ -47,7 +47,7 @@ int pam_misc_conv_died=0; /* application can probe this for timeout */
* being used.
*/
static void pam_misc_conv_delete_binary(void *appdata,
static void pam_misc_conv_delete_binary(void *appdata __unused,
pamc_bp_t *delete_me)
{
PAM_BP_RENEW(delete_me, 0, 0);
@ -59,7 +59,7 @@ void (*pam_binary_handler_free)(void *appdata, pamc_bp_t *prompt_p)
/* the following code is used to get text input */
volatile static int expired=0;
static volatile int expired=0;
/* return to the previous signal handling */
static void reset_alarm(struct sigaction *o_ptr)
@ -69,7 +69,7 @@ static void reset_alarm(struct sigaction *o_ptr)
}
/* this is where we intercept the alarm signal */
static void time_is_up(int ignore)
static void time_is_up(int ignore __unused)
{
expired = 1;
}
@ -159,7 +159,7 @@ static char *read_string(int echo, const char *prompt)
sigemptyset(&nset);
sigaddset(&nset, SIGINT);
sigaddset(&nset, SIGTSTP);
(void)_sigprocmask(SIG_BLOCK, &nset, &oset);
(void)sigprocmask(SIG_BLOCK, &nset, &oset);
} else if (!echo) {
D(("<warning: cannot turn echo off>"));
@ -215,7 +215,7 @@ static char *read_string(int echo, const char *prompt)
cleanexit:
if (have_term) {
(void)_sigprocmask(SIG_SETMASK, &oset, NULL);
(void)sigprocmask(SIG_SETMASK, &oset, NULL);
(void) tcsetattr(STDIN_FILENO, TCSADRAIN, &term_before);
}
return input;

View File

@ -1,5 +1,6 @@
/*
* $Id: pam_client.h,v 1.4 2001/01/20 22:29:47 agmorgan Exp $
* $FreeBSD$
*
* Copyright (c) 1999 Andrew G. Morgan <morgan@linux.kernel.org>
*
@ -136,7 +137,7 @@ do { \
#define PAM_BP_FILL(prmpt, offset, length, data) \
do { \
int bp_length; \
size_t bp_length; \
__u8 *prompt = (__u8 *) (prmpt); \
bp_length = PAM_BP_LENGTH(prompt); \
if (bp_length < ((length)+(offset))) { \
@ -147,7 +148,7 @@ do { \
#define PAM_BP_EXTRACT(prmpt, offset, length, data) \
do { \
int __bp_length; \
size_t __bp_length; \
const __u8 *__prompt = (const __u8 *) (prmpt); \
__bp_length = PAM_BP_LENGTH(__prompt); \
if (((offset) < 0) || (__bp_length < ((length)+(offset))) \