[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] autosprintf, C++ ?
From: |
Bruno Haible |
Subject: |
Re: [bug-gettext] autosprintf, C++ ? |
Date: |
Fri, 20 Oct 2017 17:35:19 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-96-generic; KDE/5.18.0; x86_64; ; ) |
Hi,
Ben RUBSON wrote:
> Hello Bruno,
Please write to address@hidden, not to me personally.
> I am using your autosprintf library, it works perfectly, thank you very much.
>
> I included it into a C++ program, however clang-tidy complains with the
> following :
> warning: do not define a C-style variadic function; consider using a
> function parameter pack or currying instead [cert-dcl50-cpp]
> autosprintf::autosprintf(const char *format, ...) {
> ^
>
> I'm not really sure how to tranform autosprintf to make it fully C++
> compliant.
> May I then ask you, do you have an idea how to do this ?
A web search for 'cert-dcl50-cpp' leads me to [1] -> [2].
Note that gettext is explicitly mentioned in the comments of [2].
Bruno
[1] https://clang.llvm.org/extra/clang-tidy/checks/cert-dcl50-cpp.html
[2]
https://www.securecoding.cert.org/confluence/display/cplusplus/DCL50-CPP.+Do+not+define+a+C-style+variadic+function
- Re: [bug-gettext] autosprintf, C++ ?,
Bruno Haible <=