]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
env-util: remove unneeded DISABLE_WARNING_FORMAT_NONLITERAL
authorMike Yuan <me@yhndnzj.com>
Tue, 12 Mar 2024 06:23:36 +0000 (14:23 +0800)
committerMike Yuan <me@yhndnzj.com>
Tue, 12 Mar 2024 07:41:51 +0000 (15:41 +0800)
_printf_ is used, so this shouldn't emit a warning
in the first place.

src/basic/env-util.c

index 7608f90a4a691190e8c35247cb1ce2fe587c658b..9e74ba0f0fc69a5d05550f3ee0601c28012a9a30 100644 (file)
@@ -1140,9 +1140,7 @@ int setenvf(const char *name, bool overwrite, const char *valuef, ...) {
                 return RET_NERRNO(unsetenv(name));
 
         va_start(ap, valuef);
-        DISABLE_WARNING_FORMAT_NONLITERAL;
         r = vasprintf(&value, valuef, ap);
-        REENABLE_WARNING;
         va_end(ap);
 
         if (r < 0)