From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from acme.spoerlein.net (acme.spoerlein.net [88.198.49.12]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p9D9tROw013329 for ; Thu, 13 Oct 2011 05:55:28 -0400 (EDT) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p9D9tPOI025813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 13 Oct 2011 11:55:25 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1318499725; bh=24n0uJE+P1L8sK9vjokGcbWVL+IWlovZvLlH0KUvcHM=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=lEB/Q3bj18abovVgJ0ooCUnZi8EQ7HeTtLc75iZCwJHSWX2hbj7BNXNcCWXhORIRs H2gBsetDmmwOini649IqWHYvE3KSHsHxDjKCwR7AxwHlTIa8MI95GPyGaUZriYDLB/ /7LN0pMLq110Cvx7XoxSlxM8VtukJFiY4K2NCPA8= Date: Thu, 13 Oct 2011 11:55:25 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: tech@mdocml.bsd.lv Subject: Re: mdocml version 1.12.0 available Message-ID: <20111013095525.GM26743@acme.spoerlein.net> References: <4E90B130.3080008@bsd.lv> <20111011145641.GA25314@britannica.bec.de> <20111013005045.GH28987@iris.usta.de> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111013005045.GH28987@iris.usta.de> User-Agent: Mutt/1.5.21 (2010-09-15) On Thu, 2011-10-13 at 02:50:45 +0200, Ingo Schwarze wrote: > Hi Joerg, > > Joerg Sonnenberger wrote on Tue, Oct 11, 2011 at 04:56:41PM +0200: > > > Attached is the report from clang -analyze. Food for thought ;) > > Thanks for sending these. > Below is a patch to improve style at a few places, > none of these are bugs, though. > No regressions according to my tests. > > A few more reports are valid, but i suggest to keep those redundant > initializations because it is non-trivial to figure out that all > branches actually set a value, so it's safer to initialize up > front, especially in view of potential future code changes. > > Two complaints might be bogus: > > > /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. Perhaps the HTML report is little bit more helpful: https://www.spoerlein.net/scan-build/mdocml/2011-10-13-1/report-qHe1Tf.html#EndPath hth Uli -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv