Re: Missing break statement after transformCallStmt in transformStmt

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Missing break statement after transformCallStmt in transformStmt
Date: 2018-03-07 06:39:06
Message-ID: 20180307063906.GI1744@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 07, 2018 at 11:30:53AM +0530, Ashutosh Bapat wrote:
> Commit 76b6aa41f41db66004b1c430f17a546d4102fbe7 a new case for
> CallStmt in transformStmt but forgot to add a break statement at the
> end of the case. This doesn't create any problems since the default
> case to which it continues without break doesn't change the result.
> But this is going to cause problems in future when somebody adds a
> case after CallStmt.

Indeed, this code is quite lucky to be able to run, and I can see that
the code path is stressed. What surprises me the most is that Coverity
did not complain about that, but wait... They are in maintenance mode
since the 20th of February:
https://twitter.com/CoverityScan/status/966068113941979136
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-03-07 06:49:02 Re: Rewrite of pg_dump TAP tests
Previous Message Michael Paquier 2018-03-07 06:31:06 Re: Add default role 'pg_access_server_files'