summaryrefslogtreecommitdiffstats
path: root/source/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-04-13 19:24:06 +0000
committerJeremy Allison <jra@samba.org>1998-04-13 19:24:06 +0000
commitcd2613c57261456485fe4eeecfda209ada70de8e (patch)
tree3cdaa41b5ce9c53b4c108ac11febcb59999d9cb5 /source/lib
parent883be3907778ee160872b0a0a023fc34e636774f (diff)
downloadsamba-cd2613c57261456485fe4eeecfda209ada70de8e.tar.gz
samba-cd2613c57261456485fe4eeecfda209ada70de8e.tar.xz
samba-cd2613c57261456485fe4eeecfda209ada70de8e.zip
Changes to allow Samba to be compiled with -Wstrict-prototypes
with gcc. (Not a big change although it looks like it :-). Jeremy.
Diffstat (limited to 'source/lib')
-rw-r--r--source/lib/access.c4
-rw-r--r--source/lib/charcnv.c10
-rw-r--r--source/lib/fault.c4
-rw-r--r--source/lib/getsmbpass.c2
-rw-r--r--source/lib/interface.c2
-rw-r--r--source/lib/system.c2
-rw-r--r--source/lib/username.c8
-rw-r--r--source/lib/util.c4
8 files changed, 17 insertions, 19 deletions
diff --git a/source/lib/access.c b/source/lib/access.c
index cc2bf8632b7..fe78700eddd 100644
--- a/source/lib/access.c
+++ b/source/lib/access.c
@@ -35,7 +35,7 @@ static char sep[] = ", \t";
#define FAIL (-1)
/* Forward declarations. */
-static int list_match(char *list,char *item, int (*match_fn)());
+static int list_match(char *list,char *item, int (*match_fn)(char *, char *));
static int client_match(char *tok,char *item);
static int string_match(char *tok,char *s);
static int masked_match(char *tok, char *slash, char *s);
@@ -118,7 +118,7 @@ BOOL allow_access(char *deny_list,char *allow_list,char *cname,char *caddr)
/* list_match - match an item against a list of tokens with exceptions */
/* (All modifications are marked with the initials "jkf") */
-static int list_match(char *list,char *item, int (*match_fn)())
+static int list_match(char *list,char *item, int (*match_fn)(char *, char *))
{
char *tok;
char *listcopy; /* jkf */
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index e92e8170f07..42be32ccb39 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -30,7 +30,7 @@ static BOOL mapsinited = 0;
static char unix2dos[256];
static char dos2unix[256];
-static void initmaps() {
+static void initmaps(void) {
int k;
for (k = 0; k < 256; k++) unix2dos[k] = k;
@@ -51,7 +51,7 @@ static void update_map(char * str) {
}
}
-static void init_iso8859_1() {
+static void init_iso8859_1(void) {
int i;
if (!mapsinited) initmaps();
@@ -81,7 +81,7 @@ update_map("\370\233\371\227\372\243\373\226\374\201\375\354\376\347\377\230");
/* Init for eastern european languages. */
-static void init_iso8859_2() {
+static void init_iso8859_2(void) {
int i;
if (!mapsinited) initmaps();
@@ -118,7 +118,7 @@ update_map("\377\372");
/* Added by Max Khon <max@iclub.nsu.ru> */
-static void init_iso8859_5()
+static void init_iso8859_5(void)
{
int i;
if (!mapsinited) initmaps();
@@ -145,7 +145,7 @@ update_map("\374\360\377\240");
/* Init for russian language (koi8) */
-static void init_koi8_r()
+static void init_koi8_r(void)
{
if (!mapsinited) initmaps();
diff --git a/source/lib/fault.c b/source/lib/fault.c
index e3299c50dbd..f46ccbb1855 100644
--- a/source/lib/fault.c
+++ b/source/lib/fault.c
@@ -23,7 +23,7 @@
extern int DEBUGLEVEL;
-static void (*cont_fn)();
+static void (*cont_fn)(void *);
/*******************************************************************
@@ -66,7 +66,7 @@ static void sig_fault(int sig)
/*******************************************************************
setup our fault handlers
********************************************************************/
-void fault_setup(void (*fn)())
+void fault_setup(void (*fn)(void *))
{
cont_fn = fn;
diff --git a/source/lib/getsmbpass.c b/source/lib/getsmbpass.c
index 3996c452696..68754f08486 100644
--- a/source/lib/getsmbpass.c
+++ b/source/lib/getsmbpass.c
@@ -161,5 +161,5 @@ char *getsmbpass(char *prompt)
#else
- void getsmbpasswd_dummy() {;}
+ void getsmbpasswd_dummy(void) {;}
#endif
diff --git a/source/lib/interface.c b/source/lib/interface.c
index 9687e1336c6..8c1610e9cba 100644
--- a/source/lib/interface.c
+++ b/source/lib/interface.c
@@ -453,7 +453,7 @@ int iface_count(void)
/****************************************************************************
True if we have two or more interfaces.
**************************************************************************/
-BOOL we_are_multihomed()
+BOOL we_are_multihomed(void)
{
static int multi = -1;
diff --git a/source/lib/system.c b/source/lib/system.c
index f5fbae53abe..3eef8e5034c 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -215,8 +215,6 @@ static int copy_reg(char *source, const char *dest)
{
struct stat source_stats;
int ifd;
- int full_write();
- int safe_read();
int ofd;
char *buf;
int len; /* Number of bytes read into `buf'. */
diff --git a/source/lib/username.c b/source/lib/username.c
index 751b0e53363..6c65d5d8cb5 100644
--- a/source/lib/username.c
+++ b/source/lib/username.c
@@ -23,8 +23,8 @@
extern int DEBUGLEVEL;
/* internal functions - modified versions of the ones in password.c */
-static struct passwd *uname_string_combinations(char *s, struct passwd * (*fn) (), int N);
-static struct passwd *uname_string_combinations2(char *s, int offset, struct passwd * (*fn) (), int N);
+static struct passwd *uname_string_combinations(char *s, struct passwd * (*fn) (char *), int N);
+static struct passwd *uname_string_combinations2(char *s, int offset, struct passwd * (*fn) (char *), int N);
/****************************************************************************
get a users home directory. tries as-is then lower case
@@ -288,7 +288,7 @@ try all combinations with N uppercase letters.
offset is the first char to try and change (start with 0)
it assumes the string starts lowercased
****************************************************************************/
-static struct passwd *uname_string_combinations2(char *s,int offset,struct passwd *(*fn)(),int N)
+static struct passwd *uname_string_combinations2(char *s,int offset,struct passwd *(*fn)(char *),int N)
{
int len = strlen(s);
int i;
@@ -322,7 +322,7 @@ try all combinations with up to N uppercase letters.
offset is the first char to try and change (start with 0)
it assumes the string starts lowercased
****************************************************************************/
-static struct passwd * uname_string_combinations(char *s,struct passwd * (*fn)(),int N)
+static struct passwd * uname_string_combinations(char *s,struct passwd * (*fn)(char *),int N)
{
int n;
struct passwd *ret;
diff --git a/source/lib/util.c b/source/lib/util.c
index 96cb86a1d88..2990a336c57 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -3721,7 +3721,7 @@ static BOOL matchname(char *remotehost,struct in_addr addr)
static BOOL global_client_name_done = False;
static BOOL global_client_addr_done = False;
-void reset_globals_after_fork()
+void reset_globals_after_fork(void)
{
global_client_name_done = False;
global_client_addr_done = False;
@@ -4621,7 +4621,7 @@ void set_remote_arch(enum remote_arch_types type)
/*******************************************************************
Get the remote_arch type.
********************************************************************/
-enum remote_arch_types get_remote_arch()
+enum remote_arch_types get_remote_arch(void)
{
return ra_type;
}