From: Bruno Haible Date: Tue, 10 Dec 2024 20:19:17 +0000 (+0100) Subject: openat-die: Fix a gcc -Wformat -Wformat-security warning. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9133bc1bcc5d122ad85d4f37545ea1e2f32d6048;p=gnulib.git openat-die: Fix a gcc -Wformat -Wformat-security warning. * lib/openat-die.c (openat_save_fail, openat_restore_fail): Put the internationalized error message into non-format-string position. --- diff --git a/ChangeLog b/ChangeLog index 5bfb71b28d..f558a22d4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2024-05-12 Simon Josefsson +2024-12-10 Bruno Haible + + openat-die: Fix a gcc -Wformat -Wformat-security warning. + * lib/openat-die.c (openat_save_fail, openat_restore_fail): Put the + internationalized error message into non-format-string position. + +2024-12-10 Simon Josefsson announce-gen: Mention git commit and tag in announcement. * build-aux/announce-gen (this_commit_hash): New variable. diff --git a/lib/openat-die.c b/lib/openat-die.c index 403ca4ff7c..022109b433 100644 --- a/lib/openat-die.c +++ b/lib/openat-die.c @@ -34,7 +34,7 @@ _Noreturn void openat_save_fail (int errnum) { #ifndef GNULIB_LIBPOSIX - error (exit_failure, errnum, + error (exit_failure, errnum, "%s", _("unable to record current working directory")); #endif /* _Noreturn cannot be applied to error, since it returns @@ -53,7 +53,7 @@ _Noreturn void openat_restore_fail (int errnum) { #ifndef GNULIB_LIBPOSIX - error (exit_failure, errnum, + error (exit_failure, errnum, "%s", _("failed to return to initial working directory")); #endif