Fix various compiler warnings (bug #322)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-09-27 02:45:37 +00:00
parent 78b6e77a95
commit 55e664cb00
9 changed files with 39 additions and 26 deletions

View File

@@ -25,11 +25,12 @@
#define TZ_STRLEN_MAX 255
/* #define DEBUG */
#include <asterisk/lock.h>
#include <asterisk/localtime.h>
#ifndef lint
#ifndef NOID
static char elsieid[] = "@(#)localtime.c 7.57";
static const char elsieid[] = "@(#)localtime.c 7.57";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -45,7 +46,7 @@ static char elsieid[] = "@(#)localtime.c 7.57";
#include <sys/stat.h>
#include "private.h"
#include "tzfile.h"
#include "fcntl.h"
#include <fcntl.h>
#ifdef DEBUG
#include <stdio.h>
#endif
@@ -929,7 +930,7 @@ ast_tzset P((const char *name))
cur_state->ttis[0].tt_gmtoff = 0;
cur_state->ttis[0].tt_abbrind = 0;
(void) strcpy(cur_state->chars, gmt);
} else if (tzload(name, cur_state) != 0)
} else if (tzload(name, cur_state) != 0) {
if (name[0] == ':') {
(void) gmtload(cur_state);
} else if (tzparse(name, cur_state, FALSE) != 0) {
@@ -938,6 +939,7 @@ ast_tzset P((const char *name))
/* Last ditch, get GMT */
(void) gmtload(cur_state);
}
}
strncpy(cur_state->name,name,sizeof(cur_state->name));
if (last_lclptr)
last_lclptr->next = cur_state;