Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0VgJ-0005n4-Ag for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Oct 2017 16:40:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e0VgI-0008Ll-Qo for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Oct 2017 16:40:58 +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.84_2) (envelope-from ) id 1e0VfZ-0006mE-TK for pgsql-bugs@postgresql.org; Fri, 06 Oct 2017 16:40:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e0VfS-0001de-Sy for pgsql-bugs@postgresql.org; Fri, 06 Oct 2017 16:40:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v96Ge41T009088; Fri, 6 Oct 2017 12:40:04 -0400 From: Tom Lane To: David Binderman cc: "pgsql-bugs@postgresql.org" Subject: Re: postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84:sanity check after use ? In-reply-to: References: Comments: In-reply-to David Binderman message dated "Fri, 06 Oct 2017 15:18:07 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9086.1507308004.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 06 Oct 2017 12:40:04 -0400 Message-ID: <9087.1507308004@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org David Binderman writes: > postgresql-10.0/src/backend/optimizer/geqo/geqo_ox2.c:84]: (style) Array = index 'j' is used before limits check. Hmm, this code is ifdef'd out as of v10, so I'm not sure why your tool paid any attention to it. Since it's not used, and hasn't been used in decades, and has got more bugs than just this stylistic one (in particular, even if we fixed that innermost loop, the next line would still access the undefined select_list value; plus I think it will fail badly in the event that the "make a list of selected cities" loop picks the same "pos" more than once), I'm disinclined to spend any effort on fixing it. regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs