mirror of
https://github.com/vgough/encfs.git
synced 2024-11-25 01:13:12 +01:00
Disable Clang C-style variadic warnings in autosprintf
This commit is contained in:
parent
00bd6d3c45
commit
9766a6c17d
@ -35,7 +35,7 @@
|
|||||||
namespace gnu {
|
namespace gnu {
|
||||||
|
|
||||||
/* Constructor: takes a format string and the printf arguments. */
|
/* Constructor: takes a format string and the printf arguments. */
|
||||||
autosprintf::autosprintf(const char *format, ...) {
|
autosprintf::autosprintf(const char *format, ...) { // NOLINT (cert-dcl50-cpp) as it's not critical
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
if (vasprintf(&str, format, args) < 0) {
|
if (vasprintf(&str, format, args) < 0) {
|
||||||
@ -50,7 +50,9 @@ autosprintf::autosprintf(const autosprintf &src) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Destructor: frees the temporarily allocated string. */
|
/* Destructor: frees the temporarily allocated string. */
|
||||||
autosprintf::~autosprintf() { free(str); }
|
autosprintf::~autosprintf() {
|
||||||
|
free(str); // NOLINT (cppcoreguidelines-no-malloc) as it's a consequence of vasprintf / variadic function above
|
||||||
|
}
|
||||||
|
|
||||||
/* Conversion to string. */
|
/* Conversion to string. */
|
||||||
autosprintf::operator char *() const {
|
autosprintf::operator char *() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user