summaryrefslogtreecommitdiffstats
path: root/common/gettime.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-12-17 13:26:38 +0100
committerWerner Koch <wk@gnupg.org>2003-12-17 13:26:38 +0100
commit8ab35a7d26707dfa0032b3b0dbde6a984a9683cb (patch)
tree6506bd41badddfc72100a5f6c37a51c7f2099560 /common/gettime.c
parent(initialize): Replaced use of non-literal forma (diff)
downloadgnupg2-8ab35a7d26707dfa0032b3b0dbde6a984a9683cb.tar.xz
gnupg2-8ab35a7d26707dfa0032b3b0dbde6a984a9683cb.zip
* gettime.c (asctimestamp): Add a note on a non-avoidable gcc warning.
* util.h [!HAVE_VASPRINTF]: Add printf format attribute to the replacement function. * miscellaneous.c (xasprintf): New.
Diffstat (limited to 'common/gettime.c')
-rw-r--r--common/gettime.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/gettime.c b/common/gettime.c
index ed1d0c819..93e4ba113 100644
--- a/common/gettime.c
+++ b/common/gettime.c
@@ -246,9 +246,11 @@ asctimestamp( u32 stamp )
mem2str( fmt, nl_langinfo(D_T_FMT), DIM(fmt)-3 );
if( strstr( fmt, "%Z" ) == NULL )
strcat( fmt, " %Z");
- strftime( buffer, DIM(buffer)-1, fmt, tp );
+ /* NOTE: gcc -Wformat-noliteral will complain here. I have
+ found no way to suppress this warning .*/
+ strftime (buffer, DIM(buffer)-1, fmt, tp);
#else
- /* fixme: we should check whether the locale appends a " %Z"
+ /* FIXME: we should check whether the locale appends a " %Z"
* These locales from glibc don't put the " %Z":
* fi_FI hr_HR ja_JP lt_LT lv_LV POSIX ru_RU ru_SU sv_FI sv_SE zh_CN
*/