tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: tech@mdocml.bsd.lv
Subject: Re: mdocml version 1.12.0 available
Date: Sat, 15 Oct 2011 20:28:16 +0200	[thread overview]
Message-ID: <20111015182816.GA10574@britannica.bec.de> (raw)
In-Reply-To: <20111015150249.GB2496@iris.usta.de>

On Sat, Oct 15, 2011 at 05:02:49PM +0200, Ingo Schwarze wrote:
> Hi Ulrich,
> 
> Ulrich Spörlein wrote on Thu, Oct 13, 2011 at 11:55:25AM +0200:
> > On Thu, 2011-10-13 at 02:50:45 +0200, Ingo Schwarze wrote:
> >> Joerg Sonnenberger wrote on Tue, Oct 11, 2011 at 04:56:41PM +0200:
> 
> >>> /home/joerg/work/NetBSD/cvs/src/external/bsd/mdocml/bin/mandoc/../../dist/mdoc_term.c:617:7: warning: Access to field 'prev' results in a dereference of a null pointer (loaded from variable 'n')
> >>>                 if (n->prev && MDOC_It == n->prev->tok) {
> >>>                     ^
> >>> /home/joerg/work/NetBSD/cvs/src/external/bsd/mdocml/bin/mandoc/../../dist/mdoc_term.c:611:7: warning: Access to field 'prev' results in a dereference of a null pointer (loaded from variable 'n')
> >>>                 if (n->prev && MDOC_It == n->prev->tok)
> >>>                     ^
> 
> >> I have no idea why clang thinks n might be NULL here.
> >> Do you understand that?
> >> Or is this just a false positive?
> 
> > print_bvspace could have been called with n being NULL.
> 
> No, i just checked all callers.
> All callers access n before calling print_bvspace,
> so it's a false positive.

That's not clear from the code flow and given that there are explicit
checks for NULL around, it punts. You could make this assumptions clear
with an assert.

Joerg
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2011-10-15 18:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E90B130.3080008@bsd.lv>
     [not found] ` <20111011145641.GA25314@britannica.bec.de>
2011-10-13  0:50   ` Ingo Schwarze
2011-10-13  9:55     ` Ulrich Spörlein
2011-10-15 15:02       ` Ingo Schwarze
2011-10-15 18:28         ` Joerg Sonnenberger [this message]
2011-10-16 10:35           ` Ingo Schwarze
2011-10-16 11:01             ` Kristaps Dzonsons

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=20111015182816.GA10574@britannica.bec.de \
    --to=joerg@britannica.bec.de \
    --cc=tech@mdocml.bsd.lv \
    /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.
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 NNTP newsgroup(s).