diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-12 13:50:08 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-12 13:50:08 -0600 |
commit | 33da3d498b9d27edc0a6fdf9aa7f9933a8045a25 (patch) | |
tree | b97adf8d96abb32feb0f3cffaa6e78ad4893d949 /nuttx | |
parent | 57c33e5418a3bdf06ed144b4a0405506d9c1f89a (diff) | |
download | nuttx-33da3d498b9d27edc0a6fdf9aa7f9933a8045a25.tar.gz nuttx-33da3d498b9d27edc0a6fdf9aa7f9933a8045a25.tar.bz2 nuttx-33da3d498b9d27edc0a6fdf9aa7f9933a8045a25.zip |
Fix warning caused by change in mktime prototype
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/libc/time/lib_strftime.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nuttx/libc/time/lib_strftime.c b/nuttx/libc/time/lib_strftime.c index 157687910..3eae8e019 100644 --- a/nuttx/libc/time/lib_strftime.c +++ b/nuttx/libc/time/lib_strftime.c @@ -142,13 +142,14 @@ static const char * const g_monthname[12] = * ****************************************************************************/ -size_t strftime(char *s, size_t max, const char *format, const struct tm *tm) +size_t strftime(FAR char *s, size_t max, FAR const char *format, + FAR const struct tm *tm) { - const char *str; - char *dest = s; - int chleft = max; - int value; - int len; + FAR const char *str; + FAR char *dest = s; + int chleft = max; + int value; + int len; while (*format && chleft > 0) { @@ -342,12 +343,12 @@ size_t strftime(char *s, size_t max, const char *format, const struct tm *tm) break; /* %s: The number of seconds since the Epoch, that is, since 1970-01-01 - * 00:00:00 UTC. + * 00:00:00 UTC. Hmmm... mktime argume is not 'const'. */ case 's': { - len = snprintf(dest, chleft, "%d", mktime(tm)); + len = snprintf(dest, chleft, "%d", mktime((FAR struct tm *)tm)); } break; |