diff options
author | Werner Koch <wk@gnupg.org> | 2003-12-17 13:26:38 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-12-17 13:26:38 +0100 |
commit | 8ab35a7d26707dfa0032b3b0dbde6a984a9683cb (patch) | |
tree | 6506bd41badddfc72100a5f6c37a51c7f2099560 /common/gettime.c | |
parent | (initialize): Replaced use of non-literal forma (diff) | |
download | gnupg2-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.c | 6 |
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 */ |