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.5/8.14.5) with ESMTP id r4H10pwE009189 for ; Thu, 16 May 2013 21:00:51 -0400 (EDT) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.7/8.14.6) with ESMTP id r4H10oZQ030288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 May 2013 03:00:50 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1368752450; bh=yEoiD4OhohhpJsCeyrVu45SIhJIXp/wOvUUWMhObRdo=; h=Date:From:To:Subject; b=S1W7u5MkoBzcqDNeuSn0Y3NsL8uhKMOWkreAF7oYM63MqfUH4qeFzM4RNUGaXwXQ2 FQMDQXojxzoF9LHA4pQnDQEbhYP+IOrsbOZNHoQltBF1NCXN/D4t882Zk3ilgIeUyR omMvZWwmT5bxYji5dFQWemnC+Bjtl+uP0SxxEMg8= Date: Fri, 17 May 2013 03:00:50 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: tech@mdocml.bsd.lv Subject: [patch] remove dead code Message-ID: <20130517010050.GY2055@acme.spoerlein.net> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="h22Fi9ANawrtbNPX" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) --h22Fi9ANawrtbNPX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hey, please see the following patch which removes a bit of dead code. With sz being invariant 0, the loop will never do anything. This is Coverity Scan CID 975717 Cheers, Uli --h22Fi9ANawrtbNPX Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="tree.diff" Index: tree.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tree.c,v retrieving revision 1.47 diff -u -p -r1.47 tree.c --- tree.c 18 Sep 2011 14:14:15 -0000 1.47 +++ tree.c 17 May 2013 00:42:33 -0000 @@ -58,12 +58,12 @@ print_mdoc(const struct mdoc_node *n, in { const char *p, *t; int i, j; - size_t argc, sz; + size_t argc; char **params; struct mdoc_argv *argv; argv = NULL; - argc = sz = 0; + argc = 0; params = NULL; t = p = NULL; @@ -162,9 +162,6 @@ print_mdoc(const struct mdoc_node *n, in printf(" ]"); } - for (i = 0; i < (int)sz; i++) - printf(" [%s]", params[i]); - printf(" %d:%d\n", n->line, n->pos); } --h22Fi9ANawrtbNPX-- -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv