Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 838941B2D9D5 for ; Mon, 26 Mar 2012 16:54:07 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SCFzR-0000SP-W3 for pgsql-hackers@postgresql.org; Mon, 26 Mar 2012 19:54:06 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q2QJrqTT016441; Mon, 26 Mar 2012 15:53:52 -0400 (EDT) To: Peter Eisentraut cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Remove dead assignment In-reply-to: <1332790159.3800.8.camel@vanquo.pezone.net> References: <15768.1332789342@sss.pgh.pa.us> <1332790159.3800.8.camel@vanquo.pezone.net> Comments: In-reply-to Peter Eisentraut message dated "Mon, 26 Mar 2012 22:29:19 +0300" Date: Mon, 26 Mar 2012 15:53:52 -0400 Message-ID: <16440.1332791632@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/1581 X-Sequence-Number: 205463 Peter Eisentraut writes: > On mån, 2012-03-26 at 15:15 -0400, Tom Lane wrote: >> I also do not think it does anything for readability for this call >> of read_info() to be unexpectedly unlike all the others. > I do not think that it is good code quality to assign something to a > variable and then assign something different to a variable later in the > same function. Well, that's a totally different issue, because if we had used a different variable for the other purpose, this assignment would still be dead and coverity would still be whinging about it, no? The problem that I have with this change (and the similar ones you've made elsewhere) is really that it's only chance that the code isn't fetching anything from the result of read_info. If we subsequently wanted to change the logic so it did do that, we'd have to put back the assignment. That sort of code churn benefits nobody. regards, tom lane