1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

r6586: get rid of a few more compiler warnings

This commit is contained in:
Herb Lewis
2005-05-02 17:49:43 +00:00
committed by Gerald (Jerry) Carter
parent 93ee9cfe22
commit 173375f8d8
16 changed files with 34 additions and 7 deletions

View File

@ -22,6 +22,9 @@
/* Stupid dummy functions required due to the horrible dependency mess /* Stupid dummy functions required due to the horrible dependency mess
in Samba. */ in Samba. */
void become_root(void);
void unbecome_root(void);
void become_root(void) void become_root(void)
{ {
return; return;

View File

@ -22,6 +22,8 @@
/* Stupid dummy functions required due to the horrible dependency mess /* Stupid dummy functions required due to the horrible dependency mess
in Samba. */ in Samba. */
void decrement_smbd_process_count( void );
void decrement_smbd_process_count( void ) void decrement_smbd_process_count( void )
{ {
return; return;

View File

@ -358,6 +358,8 @@ static int iface_comp(struct iface_struct *i1, struct iface_struct *i2)
/* this wrapper is used to remove duplicates from the interface list generated /* this wrapper is used to remove duplicates from the interface list generated
above */ above */
int get_interfaces(struct iface_struct *ifaces, int max_interfaces);
int get_interfaces(struct iface_struct *ifaces, int max_interfaces) int get_interfaces(struct iface_struct *ifaces, int max_interfaces)
{ {
int total, i, j; int total, i, j;

View File

@ -497,6 +497,8 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
} }
#else /* HAVE_SYS_QUOTAS */ #else /* HAVE_SYS_QUOTAS */
void dummy_sysquotas_c(void);
void dummy_sysquotas_c(void) void dummy_sysquotas_c(void)
{ {
return; return;

View File

@ -335,5 +335,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
} }
#else /* HAVE_QUOTACTL_4A */ #else /* HAVE_QUOTACTL_4A */
void dummy_sysquotas_4A(void);
void dummy_sysquotas_4A(void){} void dummy_sysquotas_4A(void){}
#endif /* HAVE_QUOTACTL_4A */ #endif /* HAVE_QUOTACTL_4A */

View File

@ -556,5 +556,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
} }
#else /* HAVE_QUOTACTL_LINUX */ #else /* HAVE_QUOTACTL_LINUX */
void dummy_sysquotas_linux(void);
void dummy_sysquotas_linux(void){} void dummy_sysquotas_linux(void){}
#endif /* HAVE_QUOTACTL_LINUX */ #endif /* HAVE_QUOTACTL_LINUX */

View File

@ -329,5 +329,7 @@ int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
} }
#else /* HAVE_XFS_QUOTAS */ #else /* HAVE_XFS_QUOTAS */
void dummy_sysquotas_xfs(void);
void dummy_sysquotas_xfs(void){} void dummy_sysquotas_xfs(void){}
#endif /* HAVE_XFS_QUOTAS */ #endif /* HAVE_XFS_QUOTAS */

View File

@ -525,11 +525,13 @@ failed:
#if defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING) && !defined(HAVE_KRB5_PRINC_COMPONENT) #if defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING) && !defined(HAVE_KRB5_PRINC_COMPONENT)
const krb5_data *krb5_princ_component(krb5_context context, krb5_principal principal, int i );
const krb5_data *krb5_princ_component(krb5_context context, krb5_principal principal, int i ) const krb5_data *krb5_princ_component(krb5_context context, krb5_principal principal, int i )
{ {
static krb5_data kdata; static krb5_data kdata;
kdata.data = krb5_principal_get_comp_string(context, principal, i); kdata.data = (char *)krb5_principal_get_comp_string(context, principal, i);
kdata.length = strlen(kdata.data); kdata.length = strlen(kdata.data);
return &kdata; return &kdata;
} }

View File

@ -243,5 +243,7 @@ struct cnotify_fns *kernel_notify_init(void)
} }
#else #else
void notify_kernel_dummy(void);
void notify_kernel_dummy(void) {} void notify_kernel_dummy(void) {}
#endif /* HAVE_KERNEL_CHANGE_NOTIFY */ #endif /* HAVE_KERNEL_CHANGE_NOTIFY */

View File

@ -311,5 +311,7 @@ struct kernel_oplocks *linux_init_kernel_oplocks(void)
return &koplocks; return &koplocks;
} }
#else #else
void oplock_linux_dummy(void);
void oplock_linux_dummy(void) {} void oplock_linux_dummy(void) {}
#endif /* HAVE_KERNEL_OPLOCKS_LINUX */ #endif /* HAVE_KERNEL_OPLOCKS_LINUX */

View File

@ -1,5 +1,7 @@
/* a trivial function used to test building shared libraries */ /* a trivial function used to test building shared libraries */
int foo(void);
int foo(void) int foo(void)
{ {
return 1; return 1;

View File

@ -28,6 +28,8 @@
#define SYS_DQBLK dqblk #define SYS_DQBLK dqblk
#endif #endif
int autoconf_quota(void);
int autoconf_quota(void) int autoconf_quota(void)
{ {
int ret = -1; int ret = -1;

View File

@ -1556,8 +1556,8 @@ BOOL torture_denytest2(int dummy)
resultstr(denytable2[i].result)); resultstr(denytable2[i].result));
} }
cli_close(cli1, fnum1); if (fnum1 != -1) cli_close(cli1, fnum1);
cli_close(cli2, fnum2); if (fnum2 != -1) cli_close(cli2, fnum2);
} }
for (i=0;i<2;i++) { for (i=0;i<2;i++) {

View File

@ -20,6 +20,8 @@
#include "includes.h" #include "includes.h"
extern int torture_numops;
static TDB_CONTEXT *tdb; static TDB_CONTEXT *tdb;
#define NAME_LENGTH 20 #define NAME_LENGTH 20
@ -159,7 +161,6 @@ static void gen_name(char *name)
BOOL torture_mangle(int dummy) BOOL torture_mangle(int dummy)
{ {
extern int torture_numops;
static struct cli_state *cli; static struct cli_state *cli;
int i; int i;
BOOL ret = True; BOOL ret = True;

View File

@ -22,6 +22,9 @@
#include "includes.h" #include "includes.h"
extern char *optarg;
extern int optind;
static fstring host, workgroup, share, password, username, myname; static fstring host, workgroup, share, password, username, myname;
static int max_protocol = PROTOCOL_NT1; static int max_protocol = PROTOCOL_NT1;
static const char *sockops="TCP_NODELAY"; static const char *sockops="TCP_NODELAY";
@ -4902,8 +4905,6 @@ static void usage(void)
char *p; char *p;
int gotuser = 0; int gotuser = 0;
int gotpass = 0; int gotpass = 0;
extern char *optarg;
extern int optind;
BOOL correct = True; BOOL correct = True;
dbf = x_stdout; dbf = x_stdout;