Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5rx0-0004sl-UJ for pgsql-committers@arkaria.postgresql.org; Tue, 10 Apr 2018 12:00:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5rwz-0004uy-Rr for pgsql-committers@arkaria.postgresql.org; Tue, 10 Apr 2018 12:00:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5rwz-0004un-Iz for pgsql-committers@lists.postgresql.org; Tue, 10 Apr 2018 12:00:37 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5rws-000629-Mk for pgsql-committers@postgresql.org; Tue, 10 Apr 2018 12:00:36 +0000 Received: from xor.sai.msu.ru (unknown [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id F174FB19192; Tue, 10 Apr 2018 15:00:28 +0300 (MSK) Subject: Re: pgsql: Fix behavior of ~> (cube, int) operator To: Alexander Korotkov , Tom Lane Cc: pgsql-committers References: <10131.1516566042@sss.pgh.pa.us> From: Teodor Sigaev Message-ID: <27200b5a-db7c-5830-4899-43ce8a8ba657@sigaev.ru> Date: Tue, 10 Apr 2018 15:00:28 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pushed, thank you Alexander Korotkov wrote: > On Sun, Jan 21, 2018 at 11:20 PM, Tom Lane > wrote: > > Teodor Sigaev > writes: > > Fix behavior of ~> (cube, int) operator > > This patch has caused Coverity to complain, correctly AFAICS, about > dead code in cube_coord_llur in the back branches: > > 1628š š š š š š /* Inverse value if needed */ > 1629š š š š š š if (inverse) > >>>š š šCID 1463943:š Control flow issuesš (DEADCODE) > >>>š š šExecution cannot reach this statement: "result = -result;". > 1630š š š š š š š š š š result = -result; > 1631 > 1632š š š š š š PG_RETURN_FLOAT8(result); > > Seems to be due to sloppy division of changes between f50c80dbb (which > was not back-patched) and 563a053bd.š Please fix. > > > Thank you for catching this.š You diagnosis is right. > I propose to commit the attached patch to 10 and 9.6. > > ------ > Alexander Korotkov > Postgres Professional:http://www.postgrespro.com > The Russian Postgres Company -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/