Fixed compiler warnings

This commit is contained in:
Michiel Broek
2011-05-22 17:43:12 +02:00
parent ad0d7cc679
commit 517cc6944f
38 changed files with 174 additions and 210 deletions

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: clcomm.c,v 1.32 2007/03/03 14:28:39 mbse Exp $
* Purpose ...............: Client/Server communications
*
*****************************************************************************
* Copyright (C) 1997-2007
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -484,7 +483,7 @@ unsigned int sequencer()
*/
int enoughspace(unsigned int needed)
{
char *buf, *res;
char *buf;
int rc = 3, cnt;
unsigned int avail = 0L;
@@ -493,7 +492,7 @@ int enoughspace(unsigned int needed)
if (socket_send(buf) == 0) {
snprintf(buf, SS_BUFSIZE, "%s", socket_receive());
res = strtok(buf, ":");
strtok(buf, ":");
cnt = atoi(strtok(NULL, ","));
if (cnt == 1) {
rc = atoi(strtok(NULL, ";"));

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: mbfile.c,v 1.19 2005/12/03 15:09:06 mbse Exp $
* Purpose ...............: Basic File I/O
*
*****************************************************************************
* Copyright (C) 1997-2005
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -223,7 +222,7 @@ time_t file_time(char *path)
int mkdirs(char *name, mode_t mode)
{
char buf[PATH_MAX], *p, *q;
int rc, last = 0, oldmask;
int last = 0, oldmask;
memset(&buf, 0, sizeof(buf));
strncpy(buf, name, sizeof(buf)-1);
@@ -234,7 +233,7 @@ int mkdirs(char *name, mode_t mode)
oldmask = umask(000);
while ((q = strchr(p, '/'))) {
*q = '\0';
rc = mkdir(buf, mode);
mkdir(buf, mode);
last = errno;
*q = '/';
p = q+1;

View File

@@ -1,10 +1,9 @@
/*****************************************************************************
*
* $Id: nodelist.c,v 1.37 2007/07/09 18:43:53 mbse Exp $
* Purpose ...............: Read nodelists information
*
*****************************************************************************
* Copyright (C) 1997-2007
* Copyright (C) 1997-2011
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -354,7 +353,7 @@ void deinitnl(void)
*/
int initnl(void)
{
int i, rc = 0, Found;
int i, rc = 0;
FILE *dbf, *fp;
char *filexnm, buf[256], *p, *q;
struct _nlfil fdx;
@@ -450,8 +449,6 @@ int initnl(void)
fclose(dbf);
}
Found = FALSE;
/*
* Howmany TCP sessions are allowd
*/