all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Davis Herring <herring@lanl.gov>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Printing to STDERR when %d is "Cannot access memory ..."
Date: Wed, 13 Jun 2018 12:34:01 -0700	[thread overview]
Message-ID: <m2r2lalbva.wl%esq@lawlist.com> (raw)

Thank you, Davis, for teaching me how to deal with a NULL pointer when printing to STDERR.  Your code works well.  Greatly appreciated!

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DATE:  [06-13-2018 11:50:13] <13 Jun 2018 12:50:13 -0600>
FROM:  Davis Herring <herring@lanl.gov>
> 
> > fprintf (stderr, "(%d)", (font->space_width == NULL
> >                            ? 0
> >                            : font->space_width);
> >
> > However, that didn't fix the problem.
> 
> You meant
> 
>    fprintf (stderr, "(%d)", font == NULL ? 0 :
>                             font->space_width);
> 
> It's font that could be null, not its space_width.
> 
> Davis
> 
> PS - This says nothing about why font is null -- it might be a bug, or
> it might just be a bug that this code uses it without checking.
> 
> --
> This product is sold by volume, not by mass.  If it appears too dense or
> too sparse, it is because mass-energy conversion has occurred during
> shipping.



             reply	other threads:[~2018-06-13 19:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 19:34 Keith David Bershatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-06-13 21:37 Printing to STDERR when %d is "Cannot access memory ..." Keith David Bershatsky
2018-06-13 19:34 Keith David Bershatsky
2018-06-13 19:46 ` Eli Zaretskii
2018-06-13 18:37 Keith David Bershatsky
2018-06-13 18:50 ` Davis Herring
2018-06-13 19:11 ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=m2r2lalbva.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=herring@lanl.gov \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.