Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c) - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)
Date
Msg-id 20220711.143500.1660612605708077512.horikyota.ntt@gmail.com
Whole thread Raw
In response to Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)
List pgsql-hackers
At Sat, 9 Jul 2022 21:53:31 -0300, Ranier Vilela <ranier.vf@gmail.com> wrote in 
> sync.c: In function ‘RememberSyncRequest’:
> sync.c:528:10: warning: assignment to ‘PendingFsyncEntry *’ {aka ‘struct
> <anonymous> *’} from incompatible pointer type ‘PendingUnlinkEntry *’ {aka
> ‘struct <anonymous> *’} [-Wincompatible-pointer-types]
>   528 |    entry = (PendingUnlinkEntry *) lfirst(cell);
> 
> Although the structures are identical, gcc bothers to assign a pointer from
> one to the other.

If the entry were of really PendingSyncEntry, it would need a fix, but
at the same time everyone should see the same warning at their hand.

Actually, I already see the following line (maybe) at the place instead.

529@master,REL14, 508@REL13
>        PendingUnlinkEntry *entry = (PendingUnlinkEntry *) lfirst(cell);


regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pgsql: dshash: Add sequential scan support.
Next
From: John Naylor
Date:
Subject: Re: NAMEDATALEN increase because of non-latin languages