pgsql: Silence compiler warning in nbtinsert.c.

Started by Peter Geogheganover 6 years ago3 messagescomitters
Jump to latest

Silence compiler warning in nbtinsert.c.

Per buildfarm member longfin.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2d8a6fad18fcec1850b79ddcf3a0032058d86715

Modified Files
--------------
src/backend/access/nbtree/nbtinsert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Peter Geoghegan (#1)
Re: pgsql: Silence compiler warning in nbtinsert.c.

On 2020-Feb-26, Peter Geoghegan wrote:

Silence compiler warning in nbtinsert.c.

Per buildfarm member longfin.

I'm seeing another one:

/pgsql/source/master/src/backend/access/nbtree/nbtinsert.c: In function '_bt_insertonpg':
/pgsql/source/master/src/backend/access/nbtree/nbtinsert.c:1231:4: warning: 'oposting' may be used uninitialized in this function [-Wmaybe-uninitialized]
memcpy(oposting, nposting, MAXALIGN(IndexTupleSize(nposting)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In reply to: Alvaro Herrera (#2)
Re: pgsql: Silence compiler warning in nbtinsert.c.

On Wed, Feb 26, 2020 at 3:07 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

I'm seeing another one:

/pgsql/source/master/src/backend/access/nbtree/nbtinsert.c: In function '_bt_insertonpg':
/pgsql/source/master/src/backend/access/nbtree/nbtinsert.c:1231:4: warning: 'oposting' may be used uninitialized in this function [-Wmaybe-uninitialized]
memcpy(oposting, nposting, MAXALIGN(IndexTupleSize(nposting)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixed - Thanks.

--
Peter Geoghegan