r6586: get rid of a few more compiler warnings
authorHerb Lewis <herb@samba.org>
Mon, 2 May 2005 17:49:43 +0000 (17:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:46 +0000 (10:56 -0500)
(This used to be commit 173375f8d88bf8e8db8d60e5d5f0e5dcc28767d9)

16 files changed:
source3/lib/dummyroot.c
source3/lib/dummysmbd.c
source3/lib/interfaces.c
source3/lib/sysquotas.c
source3/lib/sysquotas_4A.c
source3/lib/sysquotas_linux.c
source3/lib/sysquotas_xfs.c
source3/libads/kerberos.c
source3/libsmb/clikrb5.c
source3/smbd/notify_kernel.c
source3/smbd/oplock_linux.c
source3/tests/shlib.c
source3/tests/sysquotas.c
source3/torture/denytest.c
source3/torture/mangle_test.c
source3/torture/torture.c

index c8465cb791ae5b27bd5a9984b72a1590b26b0c86..75263ed232eaa8658d7acc468c8b293ab3b12eff 100644 (file)
@@ -22,6 +22,9 @@
 /* Stupid dummy functions required due to the horrible dependency mess
    in Samba. */
 
+void become_root(void);
+void unbecome_root(void);
+
 void become_root(void)
 {
         return;
index 17bc3217743f4d7e2307764ea8d3fe0f47bf8089..153ca5cd8cfde3d3e9050edb15667d0f25f85adc 100644 (file)
@@ -22,6 +22,8 @@
 /* Stupid dummy functions required due to the horrible dependency mess
    in Samba. */
 
+void decrement_smbd_process_count( void );
+
 void decrement_smbd_process_count( void )
 {
        return;
index 96f4b4cd94fefdf3169a72b2bd076dc018207ebd..dc30bdce47a86ed13624e12c76d78331d6972e2a 100644 (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
    above */
+int get_interfaces(struct iface_struct *ifaces, int max_interfaces);
+
 int get_interfaces(struct iface_struct *ifaces, int max_interfaces)
 {
        int total, i, j;
index 61e2382bc9db2c76e70543df58a01014eafb19a3..52a598a4e6b1d73ff6c090d2733c053a70eb31ea 100644 (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 */
+ void dummy_sysquotas_c(void);
+
  void dummy_sysquotas_c(void)
 {
        return;
index ffb4123799df794674120cc92ffabf41b70f37ee..5a7d84fca916d7216eca84df0922ab2f44b52551 100644 (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 */
+ void dummy_sysquotas_4A(void);
+
  void dummy_sysquotas_4A(void){}
 #endif /* HAVE_QUOTACTL_4A */
index 3867c1b0f9b5b5e42d4167f994b192e105418e53..4c024b04cc4e8c20116cede32105ac68cc0703d8 100644 (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 */
+ void dummy_sysquotas_linux(void);
+
  void dummy_sysquotas_linux(void){}
 #endif /* HAVE_QUOTACTL_LINUX */
index 9fe4ec0d992fc7a7ce94169017151303c6745752..950fb30f042e4d3eac8c28a509d7658de71f4acd 100644 (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 */
+ void dummy_sysquotas_xfs(void);
+
  void dummy_sysquotas_xfs(void){}
 #endif /* HAVE_XFS_QUOTAS */
index 18820d9e312317c51a9eb3986797c4ccba680693..902feb2eeeb280129976d6acd79d026c2c684979 100644 (file)
@@ -248,7 +248,7 @@ krb5_principal kerberos_fetch_salt_princ_for_host_princ(krb5_context context,
  Setting principal to NULL deletes this entry.
  ************************************************************************/
 
- BOOL kerberos_secrets_store_salting_principal(const char *service,
+BOOL kerberos_secrets_store_salting_principal(const char *service,
                                              int enctype,
                                              const char *principal)
 {
index 43252b94d8352a26dfa7c5cc08fd9585f1672b5f..e70c2b8beca91c1444b98e08ee1ba8d7b85d37e1 100644 (file)
@@ -525,11 +525,13 @@ failed:
 
 
 #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 )
 {
        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);
        return &kdata;
 }
index c368fd79a129954ee27c8225a25fd369be42bd2c..5c9d885eedf159efaad9b317a8c2ff736f2e0e4b 100644 (file)
@@ -243,5 +243,7 @@ struct cnotify_fns *kernel_notify_init(void)
 }
 
 #else
+ void notify_kernel_dummy(void);
+
  void notify_kernel_dummy(void) {}
 #endif /* HAVE_KERNEL_CHANGE_NOTIFY */
index 5d6bdb98832c875790fbcb76496bc26c35f60916..6d1bc64ce102d974055425f8d35370e5184cdcf9 100644 (file)
@@ -311,5 +311,7 @@ struct kernel_oplocks *linux_init_kernel_oplocks(void)
        return &koplocks;
 }
 #else
+ void oplock_linux_dummy(void);
+
  void oplock_linux_dummy(void) {}
 #endif /* HAVE_KERNEL_OPLOCKS_LINUX */
index 761d9fd5c5740eb5c4d1a1c57918ad0a3940cca7..eddb76ff2a27ba20b472b44028f978ec6992895f 100644 (file)
@@ -1,5 +1,7 @@
 /* a trivial function used to test building shared libraries */
 
+int foo(void);
+
 int foo(void)
 {
        return 1;
index 48a34feb13e8703ba0e42a6d0a99ecd3670273f7..bf16c8ba6e104ef2bb673288791f8763e11171f0 100644 (file)
@@ -28,6 +28,8 @@
 #define SYS_DQBLK dqblk
 #endif
 
+ int autoconf_quota(void);
+
  int autoconf_quota(void)
 {
        int ret = -1;
index 89b0fdf93f6f4bdcb9d76b2a827108a8c10fe19b..a130b598159a07cc9ec5d27114e94008cf60cd02 100644 (file)
@@ -1556,8 +1556,8 @@ BOOL torture_denytest2(int dummy)
                               resultstr(denytable2[i].result));
                }
 
-               cli_close(cli1, fnum1);
-               cli_close(cli2, fnum2);
+               if (fnum1 != -1) cli_close(cli1, fnum1);
+               if (fnum2 != -1) cli_close(cli2, fnum2);
        }
                
        for (i=0;i<2;i++) {
index 5acad2d015d9c6ab304c796dff41ac8100f0f3e5..df0855d93d71e8784568dc63dd63323efc71f025 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "includes.h"
 
+extern int torture_numops;
+
 static TDB_CONTEXT *tdb;
 
 #define NAME_LENGTH 20
@@ -159,7 +161,6 @@ static void gen_name(char *name)
 
 BOOL torture_mangle(int dummy)
 {
-       extern int torture_numops;
        static struct cli_state *cli;
        int i;
        BOOL ret = True;
index b1ed1e4e37b5ae1024a507da516c2c474a390024..ef9497d9ad9e16cccee7091f8d60509a17053761 100644 (file)
@@ -22,6 +22,9 @@
 
 #include "includes.h"
 
+extern char *optarg;
+extern int optind;
+
 static fstring host, workgroup, share, password, username, myname;
 static int max_protocol = PROTOCOL_NT1;
 static const char *sockops="TCP_NODELAY";
@@ -4902,8 +4905,6 @@ static void usage(void)
        char *p;
        int gotuser = 0;
        int gotpass = 0;
-       extern char *optarg;
-       extern int optind;
        BOOL correct = True;
 
        dbf = x_stdout;