Thread: pgsql: Change fastgetattr and heap_getattr to inline functions
Change fastgetattr and heap_getattr to inline functions They were macros previously, but recent callsite additions made Coverity complain about one of the assertions being always true. This change could have been made a long time ago, but the Coverity complain broke the inertia. Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Japin Li <japinli@hotmail.com> Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com> Discussion: https://postgr.es/m/202203241021.uts52sczx3al@alvherre.pgsql Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e27f4ee0a701854daf16ac1d044f20d28a17053e Modified Files -------------- src/backend/access/heap/heapam.c | 46 ------------ src/include/access/htup_details.h | 151 +++++++++++++++++--------------------- 2 files changed, 69 insertions(+), 128 deletions(-)
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > Change fastgetattr and heap_getattr to inline functions wrasse isn't happy with this: ccache /opt/developerstudio12.6/bin/cc -m64 -Xa -v -O pg_resetwal.o -L../../../src/port -L../../../src/common -L/home/nm/sw/nopath/uuid-64/lib-L/home/nm/sw/nopath/openldap-64/lib -Wl,--as-needed -Wl,-R'/home/nm/farm/studio64v12_6/HEAD/inst/lib' -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz-lreadline -ltermcap -lnsl -lsocket -lm -o pg_resetwal Undefined first referenced symbol in file nocachegetattr pg_resetwal.o ld: fatal: symbol referencing errors I believe you need to wrap those new inline functions in "#ifndef FRONTEND". regards, tom lane
On 2022-Mar-24, Tom Lane wrote: > wrasse isn't happy with this: > > ccache /opt/developerstudio12.6/bin/cc -m64 -Xa -v -O pg_resetwal.o -L../../../src/port -L../../../src/common -L/home/nm/sw/nopath/uuid-64/lib-L/home/nm/sw/nopath/openldap-64/lib -Wl,--as-needed -Wl,-R'/home/nm/farm/studio64v12_6/HEAD/inst/lib' -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz-lreadline -ltermcap -lnsl -lsocket -lm -o pg_resetwal > Undefined first referenced > symbol in file > nocachegetattr pg_resetwal.o > ld: fatal: symbol referencing errors > > I believe you need to wrap those new inline functions in > "#ifndef FRONTEND". Ah, hadn't seen that, thanks. Pushed that as fix. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/