summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2006-12-19 20:16:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:37 -0500
commit55ed1d59455566d90a03e7123fbf7a05a4bd4539 (patch)
tree050bfb7a9e5ff6b9df388dd25e009defff81fe36
parent920e1a368504228ab3a11aa58cbf12c7c95f4fd0 (diff)
downloadsamba-55ed1d59455566d90a03e7123fbf7a05a4bd4539.tar.gz
samba-55ed1d59455566d90a03e7123fbf7a05a4bd4539.tar.bz2
samba-55ed1d59455566d90a03e7123fbf7a05a4bd4539.zip
r20261: merge 20260 from samba_3_0_24
clean up a bunch of no previous prototype warnings (This used to be commit c60687db112405262adf26dbf267804b04074e67)
-rw-r--r--source3/client/umount.cifs.c6
-rw-r--r--source3/lib/replace/test/os2_delete.c1
-rw-r--r--source3/lib/replace/test/testsuite.c2
-rw-r--r--source3/modules/vfs_afsacl.c1
-rw-r--r--source3/modules/vfs_aixacl.c1
-rw-r--r--source3/modules/vfs_aixacl2.c1
-rw-r--r--source3/modules/vfs_audit.c1
-rw-r--r--source3/modules/vfs_cacheprime.c1
-rw-r--r--source3/modules/vfs_cap.c1
-rw-r--r--source3/modules/vfs_catia.c1
-rw-r--r--source3/modules/vfs_commit.c1
-rw-r--r--source3/modules/vfs_default.c1
-rw-r--r--source3/modules/vfs_default_quota.c1
-rw-r--r--source3/modules/vfs_expand_msdfs.c1
-rw-r--r--source3/modules/vfs_extd_audit.c1
-rw-r--r--source3/modules/vfs_fake_perms.c1
-rw-r--r--source3/modules/vfs_full_audit.c1
-rw-r--r--source3/modules/vfs_gpfs.c1
-rw-r--r--source3/modules/vfs_hpuxacl.c1
-rw-r--r--source3/modules/vfs_irixacl.c1
-rw-r--r--source3/modules/vfs_netatalk.c3
-rw-r--r--source3/modules/vfs_posixacl.c1
-rw-r--r--source3/modules/vfs_prealloc.c1
-rw-r--r--source3/modules/vfs_readonly.c1
-rw-r--r--source3/modules/vfs_recycle.c1
-rw-r--r--source3/modules/vfs_shadow_copy.c5
-rw-r--r--source3/modules/vfs_solarisacl.c1
-rw-r--r--source3/modules/vfs_tru64acl.c1
-rw-r--r--source3/nsswitch/winbind_nss_linux.c2
-rw-r--r--source3/param/loadparm.c1
-rw-r--r--source3/torture/locktest.c4
-rw-r--r--source3/torture/masktest.c6
-rw-r--r--source3/torture/msgtest.c2
-rw-r--r--source3/utils/debugparse.c1
-rw-r--r--source3/utils/eventlogadm.c4
-rw-r--r--source3/utils/log2pcaphex.c12
-rw-r--r--source3/utils/smbget.c24
37 files changed, 62 insertions, 34 deletions
diff --git a/source3/client/umount.cifs.c b/source3/client/umount.cifs.c
index e762be8f06..3869e3439f 100644
--- a/source3/client/umount.cifs.c
+++ b/source3/client/umount.cifs.c
@@ -138,7 +138,7 @@ static int umount_check_perm(char * dir)
return rc;
}
-int lock_mtab(void)
+static int lock_mtab(void)
{
int rc;
@@ -151,12 +151,12 @@ int lock_mtab(void)
}
-void unlock_mtab(void)
+static void unlock_mtab(void)
{
unlink(MOUNTED_LOCK);
}
-int remove_from_mtab(char * mountpoint)
+static int remove_from_mtab(char * mountpoint)
{
int rc;
int num_matches;
diff --git a/source3/lib/replace/test/os2_delete.c b/source3/lib/replace/test/os2_delete.c
index 8501e0bb40..b2bce7e7ff 100644
--- a/source3/lib/replace/test/os2_delete.c
+++ b/source3/lib/replace/test/os2_delete.c
@@ -20,6 +20,7 @@
#define TESTDIR "test.dir"
static int test_readdir_os2_delete_ret;
+int test_readdir_os2_delete(void);
#define FAILED(d) (fprintf(stderr, "Failed for %s - %d = %s\n", d, errno, strerror(errno)), test_readdir_os2_delete_ret = 1, 1)
diff --git a/source3/lib/replace/test/testsuite.c b/source3/lib/replace/test/testsuite.c
index d45304103f..c10a220d7b 100644
--- a/source3/lib/replace/test/testsuite.c
+++ b/source3/lib/replace/test/testsuite.c
@@ -373,7 +373,7 @@ static int test_MAX(void)
struct torture_context;
-bool torture_local_replace(struct torture_context *torture)
+static bool torture_local_replace(struct torture_context *torture)
{
bool ret = true;
ret &= test_ftruncate();
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index e485b3c526..e7650fe457 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/modules/vfs_afsacl.c
@@ -1040,6 +1040,7 @@ static vfs_op_tuple afsacl_ops[] = {
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_afsacl_init(void);
NTSTATUS vfs_afsacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "afsacl",
diff --git a/source3/modules/vfs_aixacl.c b/source3/modules/vfs_aixacl.c
index 4a1fcc59a3..20c469e36c 100644
--- a/source3/modules/vfs_aixacl.c
+++ b/source3/modules/vfs_aixacl.c
@@ -208,6 +208,7 @@ static vfs_op_tuple aixacl_op_tuples[] = {
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_aixacl_init(void);
NTSTATUS vfs_aixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "aixacl",
diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c
index ed4c4031a6..62a517a6e0 100644
--- a/source3/modules/vfs_aixacl2.c
+++ b/source3/modules/vfs_aixacl2.c
@@ -530,6 +530,7 @@ static vfs_op_tuple aixjfs2_ops[] =
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_aixacl2_init(void);
NTSTATUS vfs_aixacl2_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, AIXACL2_MODULE_NAME,
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index b240cafd29..fb146c1ad4 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -297,6 +297,7 @@ static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int fd
return result;
}
+NTSTATUS vfs_audit_init(void);
NTSTATUS vfs_audit_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "audit", audit_op_tuples);
diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c
index 196441c4dd..61a92a0232 100644
--- a/source3/modules/vfs_cacheprime.c
+++ b/source3/modules/vfs_cacheprime.c
@@ -192,6 +192,7 @@ static vfs_op_tuple cprime_ops [] =
* -------------------------------------------------------------------------
*/
+NTSTATUS vfs_cacheprime_init(void);
NTSTATUS vfs_cacheprime_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE, cprime_ops);
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index c4539ca34a..c254ba0ed9 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -362,6 +362,7 @@ static vfs_op_tuple cap_op_tuples[] = {
{NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_cap_init(void);
NTSTATUS vfs_cap_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "cap", cap_op_tuples);
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index ccf637c3bc..478dab6cbe 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -308,6 +308,7 @@ SMB_VFS_LAYER_TRANSPARENT},
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_catia_init(void);
NTSTATUS vfs_catia_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "catia",
diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c
index 9d817c017d..4407490d22 100644
--- a/source3/modules/vfs_commit.c
+++ b/source3/modules/vfs_commit.c
@@ -182,6 +182,7 @@ static vfs_op_tuple commit_ops [] =
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_commit_init(void);
NTSTATUS vfs_commit_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE, commit_ops);
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 486a76ac88..c68ccbf714 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1323,6 +1323,7 @@ static vfs_op_tuple vfs_default_ops[] = {
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_default_init(void);
NTSTATUS vfs_default_init(void)
{
unsigned int needed = SMB_VFS_OP_LAST + 1; /* convert from index to count */
diff --git a/source3/modules/vfs_default_quota.c b/source3/modules/vfs_default_quota.c
index 55dc287b88..772c91dc47 100644
--- a/source3/modules/vfs_default_quota.c
+++ b/source3/modules/vfs_default_quota.c
@@ -224,6 +224,7 @@ static vfs_op_tuple default_quota_ops[] = {
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_default_quota_init(void);
NTSTATUS vfs_default_quota_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, DEFAULT_QUOTA_NAME, default_quota_ops);
diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c
index 2abab4dd2f..7176c11e4a 100644
--- a/source3/modules/vfs_expand_msdfs.c
+++ b/source3/modules/vfs_expand_msdfs.c
@@ -189,6 +189,7 @@ static vfs_op_tuple expand_msdfs_ops[] = {
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_expand_msdfs_init(void);
NTSTATUS vfs_expand_msdfs_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "expand_msdfs",
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index 1c3b25103c..06722b3b8c 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -347,6 +347,7 @@ static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, int fd
return result;
}
+NTSTATUS vfs_extd_audit_init(void);
NTSTATUS vfs_extd_audit_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "extd_audit", audit_op_tuples);
diff --git a/source3/modules/vfs_fake_perms.c b/source3/modules/vfs_fake_perms.c
index 8bd8bbf532..e31adb881c 100644
--- a/source3/modules/vfs_fake_perms.c
+++ b/source3/modules/vfs_fake_perms.c
@@ -73,6 +73,7 @@ static vfs_op_tuple fake_perms_ops[] = {
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_fake_perms_init(void);
NTSTATUS vfs_fake_perms_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fake_perms", fake_perms_ops);
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index f60a3b0585..e632040dc1 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -2039,6 +2039,7 @@ static int smb_full_audit_aio_suspend(struct vfs_handle_struct *handle, struct f
}
+NTSTATUS vfs_full_audit_init(void);
NTSTATUS vfs_full_audit_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 9cc9f78381..c8bb848d0f 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -635,6 +635,7 @@ static vfs_op_tuple gpfs_op_tuples[] = {
};
+NTSTATUS vfs_gpfs_init(void);
NTSTATUS vfs_gpfs_init(void)
{
init_gpfs();
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index 43cc45cbf1..aeb078c32d 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -95,6 +95,7 @@ static vfs_op_tuple hpuxacl_op_tuples[] = {
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_hpuxacl_init(void);
NTSTATUS vfs_hpuxacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "hpuxacl",
diff --git a/source3/modules/vfs_irixacl.c b/source3/modules/vfs_irixacl.c
index 8acb24b385..d80b34b24b 100644
--- a/source3/modules/vfs_irixacl.c
+++ b/source3/modules/vfs_irixacl.c
@@ -95,6 +95,7 @@ static vfs_op_tuple irixacl_op_tuples[] = {
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_irixacl_init(void);
NTSTATUS vfs_irixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "irixacl",
diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c
index 279160d966..7176919a7d 100644
--- a/source3/modules/vfs_netatalk.c
+++ b/source3/modules/vfs_netatalk.c
@@ -172,7 +172,7 @@ static void atalk_rrmdir(TALLOC_CTX *ctx, char *path)
/* Directory operations */
-SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
{
SMB_STRUCT_DIR *ret = 0;
@@ -394,6 +394,7 @@ static vfs_op_tuple atalk_ops[] = {
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_netatalk_init(void);
NTSTATUS vfs_netatalk_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "netatalk", atalk_ops);
diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c
index c793d83068..191c4a7cb0 100644
--- a/source3/modules/vfs_posixacl.c
+++ b/source3/modules/vfs_posixacl.c
@@ -384,6 +384,7 @@ static vfs_op_tuple posixacl_op_tuples[] = {
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_posixacl_init(void);
NTSTATUS vfs_posixacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "posixacl",
diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c
index 94db642370..2e0b8b18b4 100644
--- a/source3/modules/vfs_prealloc.c
+++ b/source3/modules/vfs_prealloc.c
@@ -206,6 +206,7 @@ static vfs_op_tuple prealloc_op_tuples[] = {
{NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_prealloc_init(void);
NTSTATUS vfs_prealloc_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
diff --git a/source3/modules/vfs_readonly.c b/source3/modules/vfs_readonly.c
index e69f7dac01..721e59430c 100644
--- a/source3/modules/vfs_readonly.c
+++ b/source3/modules/vfs_readonly.c
@@ -91,6 +91,7 @@ static vfs_op_tuple readonly_op_tuples[] = {
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_readonly_init(void);
NTSTATUS vfs_readonly_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE_NAME, readonly_op_tuples);
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c
index 4ffd683bfd..121454315f 100644
--- a/source3/modules/vfs_recycle.c
+++ b/source3/modules/vfs_recycle.c
@@ -538,6 +538,7 @@ done:
return rc;
}
+NTSTATUS vfs_recycle_init(void);
NTSTATUS vfs_recycle_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "recycle", recycle_ops);
diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c
index 447c53d773..f9a76ec72d 100644
--- a/source3/modules/vfs_shadow_copy.c
+++ b/source3/modules/vfs_shadow_copy.c
@@ -119,7 +119,7 @@ static SMB_STRUCT_DIR *shadow_copy_opendir(vfs_handle_struct *handle, const char
return((SMB_STRUCT_DIR *)dirp);
}
-SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
+static SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
@@ -151,7 +151,7 @@ static void shadow_copy_rewinddir(struct vfs_handle_struct *handle, SMB_STRUCT_D
dirp->pos = 0 ;
}
-int shadow_copy_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
+static int shadow_copy_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp)
{
shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
@@ -228,6 +228,7 @@ static vfs_op_tuple shadow_copy_ops[] = {
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_shadow_copy_init(void);
NTSTATUS vfs_shadow_copy_init(void)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "shadow_copy", shadow_copy_ops);
diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c
index 5e5e5978f2..3ec01b2a39 100644
--- a/source3/modules/vfs_solarisacl.c
+++ b/source3/modules/vfs_solarisacl.c
@@ -779,6 +779,7 @@ static vfs_op_tuple solarisacl_op_tuples[] = {
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_solarisacl_init(void);
NTSTATUS vfs_solarisacl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "solarisacl",
diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c
index 774fadf4b9..6aa9557c28 100644
--- a/source3/modules/vfs_tru64acl.c
+++ b/source3/modules/vfs_tru64acl.c
@@ -495,6 +495,7 @@ static vfs_op_tuple tru64acl_op_tuples[] = {
SMB_VFS_LAYER_NOOP}
};
+NTSTATUS vfs_tru64acl_init(void);
NTSTATUS vfs_tru64acl_init(void)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "tru64acl",
diff --git a/source3/nsswitch/winbind_nss_linux.c b/source3/nsswitch/winbind_nss_linux.c
index 6efb9041f9..5c24382c1d 100644
--- a/source3/nsswitch/winbind_nss_linux.c
+++ b/source3/nsswitch/winbind_nss_linux.c
@@ -62,7 +62,7 @@ static char *get_static(char **buffer, size_t *buflen, size_t len)
lib/util_str.c as I really don't want to have to link in any other
objects if I can possibly avoid it. */
-BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
+static BOOL next_token(char **ptr,char *buff,const char *sep, size_t bufsize)
{
char *s;
BOOL quoted;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 2ebf3b8ed3..172d32b586 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -2255,6 +2255,7 @@ static int lp_enum(const char *s,const struct enum_list *_enum)
* lp_parm_string is only used to let old modules find this symbol
*/
#undef lp_parm_string
+ char *lp_parm_string(const char *servicename, const char *type, const char *option);
char *lp_parm_string(const char *servicename, const char *type, const char *option)
{
return lp_parm_talloc_string(lp_servicenumber(servicename), type, option, NULL);
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 31fd0225f8..d248a9459d 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -54,14 +54,14 @@ extern int optind;
enum lock_op {OP_LOCK, OP_UNLOCK, OP_REOPEN};
-const char *lock_op_type(int op)
+static const char *lock_op_type(int op)
{
if (op == WRITE_LOCK) return "write";
else if (op == READ_LOCK) return "read";
else return "other";
}
-const char *lock_op_name(enum lock_op op)
+static const char *lock_op_name(enum lock_op op)
{
if (op == OP_LOCK) return "lock";
else if (op == OP_UNLOCK) return "unlock";
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index f97fb97542..0d6c0b16f2 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -38,7 +38,7 @@ extern int optind;
extern BOOL AllowDebugChange;
/* a test fn for LANMAN mask support */
-int ms_fnmatch_lanman_core(const char *pattern, const char *string)
+static int ms_fnmatch_lanman_core(const char *pattern, const char *string)
{
const char *p = pattern, *n = string;
char c;
@@ -112,7 +112,7 @@ next:
return 0;
}
-int ms_fnmatch_lanman(const char *pattern, const char *string)
+static int ms_fnmatch_lanman(const char *pattern, const char *string)
{
if (!strpbrk(pattern, "?*<>\"")) {
if (strcmp(string,"..") == 0)
@@ -163,7 +163,7 @@ static char *reg_test(struct cli_state *cli, char *pattern, char *long_name, cha
/*****************************************************
return a connection to a server
*******************************************************/
-struct cli_state *connect_one(char *share)
+static struct cli_state *connect_one(char *share)
{
struct cli_state *c;
struct nmb_name called, calling;
diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c
index e8db20f4a8..d913c4903f 100644
--- a/source3/torture/msgtest.c
+++ b/source3/torture/msgtest.c
@@ -29,7 +29,7 @@ static int pong_count;
/****************************************************************************
a useful function for testing the message system
****************************************************************************/
-void pong_message(int msg_type, struct process_id src, void *buf, size_t len)
+static void pong_message(int msg_type, struct process_id src, void *buf, size_t len)
{
pong_count++;
}
diff --git a/source3/utils/debugparse.c b/source3/utils/debugparse.c
index c5fe3e2ee8..9c86fcc37b 100644
--- a/source3/utils/debugparse.c
+++ b/source3/utils/debugparse.c
@@ -245,6 +245,7 @@ dbg_Token dbg_char2token( dbg_Token *state, int c )
return( *state );
} /* dbg_char2token */
+void dbg_test( void );
void dbg_test( void )
/* ------------------------------------------------------------------------ **
* Simple test function.
diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c
index 036ce3ad4b..a964043c83 100644
--- a/source3/utils/eventlogadm.c
+++ b/source3/utils/eventlogadm.c
@@ -60,7 +60,7 @@ static void display_eventlog_names( void )
printf( "\t<None specified>\n");
}
-int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
{
if ( argc < 3 ) {
@@ -79,7 +79,7 @@ int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
return 0;
}
-int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename )
{
FILE *f1;
char *argfname;
diff --git a/source3/utils/log2pcaphex.c b/source3/utils/log2pcaphex.c
index aa68cf09c9..b7a595f754 100644
--- a/source3/utils/log2pcaphex.c
+++ b/source3/utils/log2pcaphex.c
@@ -96,7 +96,7 @@ typedef struct {
static hdr_tcp_t HDR_TCP = {139, 139, 0, 0, 0x50, 0, 0, 0, 0};
-void print_pcap_header(FILE *out)
+static void print_pcap_header(FILE *out)
{
struct tcpdump_file_header h;
h.magic = TCPDUMP_MAGIC;
@@ -109,7 +109,7 @@ void print_pcap_header(FILE *out)
fwrite(&h, sizeof(struct tcpdump_file_header), 1, out);
}
-void print_pcap_packet(FILE *out, unsigned char *data, long length, long caplen)
+static void print_pcap_packet(FILE *out, unsigned char *data, long length, long caplen)
{
static int i = 0;
struct tcpdump_packet p;
@@ -122,7 +122,7 @@ void print_pcap_packet(FILE *out, unsigned char *data, long length, long caplen)
fwrite(data, sizeof(unsigned char), caplen, out);
}
-void print_hex_packet(FILE *out, unsigned char *data, long length)
+static void print_hex_packet(FILE *out, unsigned char *data, long length)
{
long i,cur = 0;
while(cur < length) {
@@ -136,7 +136,7 @@ void print_hex_packet(FILE *out, unsigned char *data, long length)
}
}
-void print_netbios_packet(FILE *out, unsigned char *data, long length, long actual_length)
+static void print_netbios_packet(FILE *out, unsigned char *data, long length, long actual_length)
{
unsigned char *newdata; long offset = 0;
long newlen;
@@ -159,7 +159,7 @@ void print_netbios_packet(FILE *out, unsigned char *data, long length, long actu
unsigned char *curpacket = NULL;
long curpacket_len = 0;
-void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *data_offset, long *data_length)
+static void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *data_offset, long *data_length)
{
unsigned char *buffer;
int tmp; long i;
@@ -197,7 +197,7 @@ void read_log_msg(FILE *in, unsigned char **_buffer, long *buffersize, long *dat
*_buffer = buffer;
}
-long read_log_data(FILE *in, unsigned char *buffer, long data_length)
+static long read_log_data(FILE *in, unsigned char *buffer, long data_length)
{
long i, addr; char real[2][16]; int ret;
unsigned int tmp;
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 83677359fe..4142b230f2 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -50,9 +50,9 @@ const char *username = NULL, *password = NULL, *workgroup = NULL;
int nonprompt = 0, quiet = 0, dots = 0, keep_permissions = 0, verbose = 0, send_stdout = 0;
int blocksize = SMB_DEFAULT_BLOCKSIZE;
-int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile);
+static int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile);
-int get_num_cols(void)
+static int get_num_cols(void)
{
#ifdef TIOCGWINSZ
struct winsize ws;
@@ -68,12 +68,12 @@ int get_num_cols(void)
#endif
}
-void change_columns(int sig)
+static void change_columns(int sig)
{
columns = get_num_cols();
}
-void human_readable(off_t s, char *buffer, int l)
+static void human_readable(off_t s, char *buffer, int l)
{
if(s > 1024 * 1024 * 1024) snprintf(buffer, l, "%.2fGb", 1.0 * s / (1024 * 1024 * 1024));
else if(s > 1024 * 1024) snprintf(buffer, l, "%.2fMb", 1.0 * s / (1024 * 1024));
@@ -81,7 +81,7 @@ void human_readable(off_t s, char *buffer, int l)
else snprintf(buffer, l, OFF_T_FORMAT"b", (OFF_T_FORMAT_CAST)s);
}
-void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen)
+static void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen)
{
static char hasasked = 0;
char *wgtmp, *usertmp;
@@ -113,7 +113,7 @@ void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char *
free(wgtmp); free(usertmp);
}
-int smb_download_dir(const char *base, const char *name, int resume)
+static int smb_download_dir(const char *base, const char *name, int resume)
{
char path[SMB_MAXPATHLEN];
int dirhandle;
@@ -199,7 +199,7 @@ int smb_download_dir(const char *base, const char *name, int resume)
return 1;
}
-char *print_time(long t)
+static char *print_time(long t)
{
static char buffer[100];
int secs, mins, hours;
@@ -215,7 +215,7 @@ char *print_time(long t)
return buffer;
}
-void print_progress(const char *name, time_t start, time_t now, off_t start_pos, off_t pos, off_t total)
+static void print_progress(const char *name, time_t start, time_t now, off_t start_pos, off_t pos, off_t total)
{
double avg = 0.0;
long eta = -1;
@@ -244,7 +244,7 @@ void print_progress(const char *name, time_t start, time_t now, off_t start_pos,
free(filename); free(status);
}
-int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile) {
+static int smb_download_file(const char *base, const char *name, int recursive, int resume, char *outfile) {
int remotehandle, localhandle;
time_t start_time = time(NULL);
const char *newpath;
@@ -447,7 +447,7 @@ int smb_download_file(const char *base, const char *name, int recursive, int res
return 1;
}
-void clean_exit(void)
+static void clean_exit(void)
{
char bs[100];
human_readable(total_bytes, bs, sizeof(bs));
@@ -455,12 +455,12 @@ void clean_exit(void)
exit(0);
}
-void signal_quit(int v)
+static void signal_quit(int v)
{
clean_exit();
}
-int readrcfile(const char *name, const struct poptOption long_options[])
+static int readrcfile(const char *name, const struct poptOption long_options[])
{
FILE *fd = fopen(name, "r");
int lineno = 0, i;