From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Emre Hasegeli <emre@hasegeli.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: New Defects reported by Coverity Scan for PostgreSQL
Date: Tue, 31 Jul 2018 13:21:49 -0400
Message-ID: <20180731172149.kdjl3xdjjtwxaj4s@alvherre.pgsql> (raw)
In-Reply-To: <E1fjZo1-00019i-GG@gemulon.postgresql.org>
Hello guys. Coverity complained about this patch as below. What, if
anything, should be done about it? One solution is to mark it as a
false-positive in Coverity, of course.
On 2018-Jul-29, scan-admin@coverity.com wrote:
> ** CID 1438146: API usage errors (SWAPPED_ARGUMENTS)
>
>
> ________________________________________________________________________________________________________
> *** CID 1438146: API usage errors (SWAPPED_ARGUMENTS)
> /srv/coverity/git/pgsql-git/postgresql/src/backend/utils/adt/geo_ops.c: 2647 in close_lseg()
> 2641 LSEG *l1 = PG_GETARG_LSEG_P(0);
> 2642 LSEG *l2 = PG_GETARG_LSEG_P(1);
> 2643 Point *result;
> 2644
> 2645 result = (Point *) palloc(sizeof(Point));
> 2646
> >>> CID 1438146: API usage errors (SWAPPED_ARGUMENTS)
> >>> The positions of arguments in the call to "lseg_closept_lseg" do not match the ordering of the parameters:
> * "l2" is passed to "l1"
> * "l1" is passed to "l2"
> 2647 lseg_closept_lseg(result, l2, l1);
> 2648
> 2649 PG_RETURN_POINT_P(result);
> 2650 }
> 2651
> 2652
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: alvherre@2ndquadrant.com, tomas.vondra@2ndquadrant.com, emre@hasegeli.com, pgsql-hackers@postgresql.org
Subject: Re: New Defects reported by Coverity Scan for PostgreSQL
In-Reply-To: <20180731172149.kdjl3xdjjtwxaj4s@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox