EnterpriseDB/zheap

Warnings while compiling the current master

RafiaSabih opened this issue · 3 comments

At commit:
commit 4ffb8f8 (HEAD -> master, origin/master, origin/HEAD)
Author: mahendra mahi6run@gmail.com
Date: Thu Feb 28 23:20:27 2019 +0530

In file included from ../../../../src/include/postgres.h:46:0,
from tpd.c:33:
tpd.c: In function ‘TPDAllocatePageAndAddEntry’:
../../../../src/include/c.h:757:6: warning: ‘tpd_buf’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (condition)
^
tpd.c:1324:9: note: ‘tpd_buf’ was declared here
Buffer tpd_buf;
^~~~~~~
zheapam.c: In function ‘zheap_update’:
zheapam.c:2672:6: warning: ‘need_toast’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (need_toast)
^
zheapam.c:2322:12: warning: ‘oldtupsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
pruned = zheap_page_prune_opt(relation, buffer, old_offnum,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(newtupsize - oldtupsize));
~~~~~~~~~~~~~~~~~~~~~~~~~~
zheapam.c:2458:38: warning: ‘newtupsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
(!use_inplace_update && newtupsize > pagefree) ||
~~~~~~~~~~~^~~~~~~~~~
zmultilocker.c: In function ‘GetLockerTransInfo’:
zmultilocker.c:847:16: warning: ‘trans_slot_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
*trans_slot = trans_slot_id;
~~~~~~~~~~~~^~~~~~~~~~~~~~~

HI Rafia,
I am not getting any warnings.
Please share your configure command and machine details.

CONFIGURE = '--prefix=... '--enable-cassert' '--enable-debug' 'CFLAGS=-ggdb -Og -g3 -fno-omit-frame-pointer'

what machine details you want...?

I have created a pull request with the changes for the same. If you guys feel like it you may merge it.