unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71379@debbugs.gnu.org, schnoebelen.ph@gmail.com
Subject: bug#71379: 29.3; Elisp compiler: warnings for formats given insufficiently many arguments
Date: Wed, 5 Jun 2024 21:20:53 +0200	[thread overview]
Message-ID: <4C5F14A4-EE39-4DDE-9E25-C311F2DA8BC7@gmail.com> (raw)
In-Reply-To: <861q5bjn6e.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

5 juni 2024 kl. 19.48 skrev Eli Zaretskii <eliz@gnu.org>:

> Thanks, I'd like to see the changes before making up my mind about
> that.  The problem is definitely not serious, so the fix should be
> safe enough to qualify.

Sorry, meant to attach the patch.


[-- Attachment #2: 0001-Format-string-warnings-for-more-functions-bug-71379.patch --]
[-- Type: application/octet-stream, Size: 1098 bytes --]

From 6f758e82a37a6b62abc71459c8878de7217834ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Wed, 5 Jun 2024 18:28:59 +0200
Subject: [PATCH] Format string warnings for more functions (bug#71379)

* lisp/emacs-lisp/bytecomp.el (byte-compile-format-like):
Add message-box, message-or-box, warn and user-error.
---
 lisp/emacs-lisp/bytecomp.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 03cfbe6f4c9..d59e89bd7de 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1643,7 +1643,8 @@ byte-compile-format-warn
          nargs (if (= nargs 1) "" "s")
          nfields (if (= nfields 1) "" "s"))))))
 
-(dolist (elt '(format message format-message error))
+(dolist (elt '( format message format-message message-box message-or-box
+                warn error user-error))
   (put elt 'byte-compile-format-like t))
 
 ;; Warn if the function or macro is being redefined with a different
-- 
2.32.0 (Apple Git-132)


  reply	other threads:[~2024-06-05 19:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 13:16 bug#71379: 29.3; Elisp compiler: warnings for formats given insufficiently many arguments Philippe Schnoebelen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-05 16:56 ` Mattias Engdegård
2024-06-05 17:48   ` Eli Zaretskii
2024-06-05 19:20     ` Mattias Engdegård [this message]
2024-06-06  4:38       ` Eli Zaretskii
2024-06-06  8:49         ` Mattias Engdegård
2024-06-06 23:22           ` Stefan Kangas
2024-06-07  6:21             ` Eli Zaretskii
2024-06-07 13:55               ` Andrea Corallo
2024-06-07 15:50                 ` Eli Zaretskii
2024-06-08 18:15                   ` Andrea Corallo
2024-06-08 18:18                     ` Mattias Engdegård
2024-06-08 18:32                       ` Eli Zaretskii
2024-06-09 13:57                         ` Mattias Engdegård
2024-06-10  8:11                           ` Andrea Corallo
2024-06-10 14:27                             ` Mattias Engdegård
2024-06-10 21:14                               ` Andrea Corallo
2024-06-11 14:30                                 ` Mattias Engdegård
2024-06-07  9:32             ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C5F14A4-EE39-4DDE-9E25-C311F2DA8BC7@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=71379@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=schnoebelen.ph@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).