unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
Cc: emacs-devel@gnu.org
Subject: Re: GCC warning in minibuf.c
Date: Thu, 20 Oct 2005 15:07:47 +0200	[thread overview]
Message-ID: <jepsq0bal8.fsf@sykes.suse.de> (raw)
In-Reply-To: <ufyqwcqsa.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Oct 2005 14:32:37 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> Here, the 2nd argument `function' is declared to accept a single
> Lisp_Object argument.  However, minibuf.c calls
> internal_with_output_to_temp_buffer as follows:
>
>   internal_with_output_to_temp_buffer ("*Completions*",
> 				       Fdisplay_completion_list,
> 				       Fsort (completions, Qstring_lessp));
>
> and Fdisplay_completion_list is declared to accept 2 Lisp_Object
> arguments.

Then Fdisplay_completion_list is definitely the wrong function to pass to
internal_with_output_to_temp_buffer.

> I think this is a bogus warning,

I don't agree.  Fdisplay_completion_list will be called with only a single
parameter and will receive garbage in the second one.  A sure way to make
Emacs crash.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2005-10-20 13:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-20 12:32 GCC warning in minibuf.c Eli Zaretskii
2005-10-20 13:07 ` Andreas Schwab [this message]
2005-10-20 13:38   ` Eli Zaretskii
2005-10-20 13:57     ` Andreas Schwab
2005-10-20 15:03       ` Kim F. Storm

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=jepsq0bal8.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=emacs-devel@gnu.org \
    /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).