Remove warnings
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2394 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
6c462e063e
commit
1f319c3c3c
@ -49,6 +49,13 @@
|
|||||||
|
|
||||||
#include "tdate_parse.h"
|
#include "tdate_parse.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Private Types
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#undef TDATE_PARSE_WORKS /* tdate_parse() doesn't work */
|
||||||
|
#undef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -63,6 +70,7 @@ struct strlong
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
static void pound_case(char *str)
|
static void pound_case(char *str)
|
||||||
{
|
{
|
||||||
for (; *str != '\0'; ++str)
|
for (; *str != '\0'; ++str)
|
||||||
@ -73,12 +81,16 @@ static void pound_case(char *str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
static int strlong_compare(const void *v1, const void *v2)
|
static int strlong_compare(const void *v1, const void *v2)
|
||||||
{
|
{
|
||||||
return strcmp(((struct strlong *)v1)->s, ((struct strlong *)v2)->s);
|
return strcmp(((struct strlong *)v1)->s, ((struct strlong *)v2)->s);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
static int strlong_search(char *str, struct strlong *tab, int n, long *lP)
|
static int strlong_search(char *str, struct strlong *tab, int n, long *lP)
|
||||||
{
|
{
|
||||||
int i, h, l, r;
|
int i, h, l, r;
|
||||||
@ -109,8 +121,9 @@ static int strlong_search(char *str, struct strlong *tab, int n, long *lP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0 /* Day of week not yet supported by NuttX */
|
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
static int scan_wday(char *str_wday, long *tm_wdayP)
|
static int scan_wday(char *str_wday, long *tm_wdayP)
|
||||||
{
|
{
|
||||||
static struct strlong wday_tab[] = {
|
static struct strlong wday_tab[] = {
|
||||||
@ -136,6 +149,7 @@ static int scan_wday(char *str_wday, long *tm_wdayP)
|
|||||||
}
|
}
|
||||||
#endif /* Day of week not yet supported by NuttX */
|
#endif /* Day of week not yet supported by NuttX */
|
||||||
|
|
||||||
|
#ifdef TDATE_PARSE_WORKS
|
||||||
static int scan_mon(char *str_mon, long *tm_monP)
|
static int scan_mon(char *str_mon, long *tm_monP)
|
||||||
{
|
{
|
||||||
static struct strlong mon_tab[] = {
|
static struct strlong mon_tab[] = {
|
||||||
@ -164,14 +178,14 @@ static int scan_mon(char *str_mon, long *tm_monP)
|
|||||||
return strlong_search(str_mon, mon_tab,
|
return strlong_search(str_mon, mon_tab,
|
||||||
sizeof(mon_tab) / sizeof(struct strlong), tm_monP);
|
sizeof(mon_tab) / sizeof(struct strlong), tm_monP);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
time_t tdate_parse(char *str)
|
time_t tdate_parse(char *str)
|
||||||
{
|
{
|
||||||
#if 0 // REVISIT -- doesn't work
|
#ifdef TDATE_PARSE_WORKS /* REVISIT -- doesn't work */
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
char *cp;
|
char *cp;
|
||||||
char str_mon[32];
|
char str_mon[32];
|
||||||
@ -181,7 +195,7 @@ time_t tdate_parse(char *str)
|
|||||||
int tm_min;
|
int tm_min;
|
||||||
int tm_sec;
|
int tm_sec;
|
||||||
long tm_mon;
|
long tm_mon;
|
||||||
#if 0 /* Day of week not yet supported by NuttX */
|
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
char str_wday[32];
|
char str_wday[32];
|
||||||
long tm_wday;
|
long tm_wday;
|
||||||
#endif
|
#endif
|
||||||
@ -255,7 +269,7 @@ time_t tdate_parse(char *str)
|
|||||||
tm.tm_year = tm_year;
|
tm.tm_year = tm_year;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* Day of week not yet supported by NuttX */
|
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
/* wdy, DD-mth-YY HH:MM:SS GMT */
|
/* wdy, DD-mth-YY HH:MM:SS GMT */
|
||||||
else if (sscanf(cp, "%400[a-zA-Z], %d-%400[a-zA-Z]-%d %d:%d:%d GMT",
|
else if (sscanf(cp, "%400[a-zA-Z], %d-%400[a-zA-Z]-%d %d:%d:%d GMT",
|
||||||
str_wday, &tm_mday, str_mon, &tm_year, &tm_hour, &tm_min,
|
str_wday, &tm_mday, str_mon, &tm_year, &tm_hour, &tm_min,
|
||||||
@ -272,7 +286,7 @@ time_t tdate_parse(char *str)
|
|||||||
}
|
}
|
||||||
#endif /* Day of week not yet supported by NuttX */
|
#endif /* Day of week not yet supported by NuttX */
|
||||||
|
|
||||||
#if 0 /* Day of week not yet supported by NuttX */
|
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
/* wdy, DD mth YY HH:MM:SS GMT */
|
/* wdy, DD mth YY HH:MM:SS GMT */
|
||||||
else if (sscanf(cp, "%400[a-zA-Z], %d %400[a-zA-Z] %d %d:%d:%d GMT",
|
else if (sscanf(cp, "%400[a-zA-Z], %d %400[a-zA-Z] %d %d:%d:%d GMT",
|
||||||
str_wday, &tm_mday, str_mon, &tm_year, &tm_hour, &tm_min,
|
str_wday, &tm_mday, str_mon, &tm_year, &tm_hour, &tm_min,
|
||||||
@ -289,7 +303,7 @@ time_t tdate_parse(char *str)
|
|||||||
}
|
}
|
||||||
#endif /* Day of week not yet supported by NuttX */
|
#endif /* Day of week not yet supported by NuttX */
|
||||||
|
|
||||||
#if 0 /* Day of week not yet supported by NuttX */
|
#ifdef HAVE_DAY_OF_WEEK /* Day of week not yet supported by NuttX */
|
||||||
/* wdy mth DD HH:MM:SS GMT YY */
|
/* wdy mth DD HH:MM:SS GMT YY */
|
||||||
else if (sscanf(cp, "%400[a-zA-Z] %400[a-zA-Z] %d %d:%d:%d GMT %d",
|
else if (sscanf(cp, "%400[a-zA-Z] %400[a-zA-Z] %d %d:%d:%d GMT %d",
|
||||||
str_wday, str_mon, &tm_mday, &tm_hour, &tm_min, &tm_sec,
|
str_wday, str_mon, &tm_mday, &tm_hour, &tm_min, &tm_sec,
|
||||||
|
Loading…
Reference in New Issue
Block a user