Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)

2022-07-21 Thread Alvaro Herrera
On 2022-Jul-15, Thomas Munro wrote: > On Mon, Jul 11, 2022 at 9:45 PM Kyotaro Horiguchi > wrote: > > So, for starters, I compiled the whole tree with -Wshadow=local. and I > > saw many warnings with it. At a glance all of them are reasonably > > "fixed" but I don't think it is what we want... >

Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)

2022-07-14 Thread Thomas Munro
On Mon, Jul 11, 2022 at 9:45 PM Kyotaro Horiguchi wrote: > At Mon, 11 Jul 2022 01:45:16 -0400, Tom Lane wrote in > > Kyotaro Horiguchi writes: > > > At Sat, 9 Jul 2022 21:53:31 -0300, Ranier Vilela > > > wrote in > > >> 528 |entry = (PendingUnlinkEntry *) lfirst(cell); > > > > > Actually,

Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)

2022-07-11 Thread Kyotaro Horiguchi
At Mon, 11 Jul 2022 01:45:16 -0400, Tom Lane wrote in > [ cc'ing Thomas, whose code this seems to be ] > > Kyotaro Horiguchi writes: > > At Sat, 9 Jul 2022 21:53:31 -0300, Ranier Vilela > > wrote in > >> 528 |entry = (PendingUnlinkEntry *) lfirst(cell); > > > Actually, I already see the

Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)

2022-07-10 Thread Tom Lane
[ cc'ing Thomas, whose code this seems to be ] Kyotaro Horiguchi writes: > At Sat, 9 Jul 2022 21:53:31 -0300, Ranier Vilela wrote > in >> sync.c: In function ¡RememberSyncRequest¢: >> sync.c:528:10: warning: assignment to ¡PendingFsyncEntry *¢ {aka ¡struct >> *¢} from incompatible pointer typ

Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)

2022-07-10 Thread Kyotaro Horiguchi
At Sat, 9 Jul 2022 21:53:31 -0300, Ranier Vilela wrote in > sync.c: In function ‘RememberSyncRequest’: > sync.c:528:10: warning: assignment to ‘PendingFsyncEntry *’ {aka ‘struct > *’} from incompatible pointer type ‘PendingUnlinkEntry *’ {aka > ‘struct *’} [-Wincompatible-pointer-types] > 528

Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)

2022-07-09 Thread Ranier Vilela
Hi, In one of my compilations of Postgres, I noted this warning from gcc. gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv