1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Fix compiler warnings about typedef redefinitions

Clang with -Wtypedef-redefinition produced warnings:

    src/include/storage/latch.h:122:3: error: redefinition of typedef 'Latch' is a C11 feature [-Werror,-Wtypedef-redefinition]

Per buildfarm
This commit is contained in:
Heikki Linnakangas
2025-03-06 03:10:22 +02:00
parent 7f7f324eb5
commit 39de4f157d

View File

@ -70,7 +70,7 @@ typedef struct WaitEvent
/* forward declarations to avoid exposing waiteventset.c implementation details */ /* forward declarations to avoid exposing waiteventset.c implementation details */
typedef struct WaitEventSet WaitEventSet; typedef struct WaitEventSet WaitEventSet;
typedef struct Latch Latch; struct Latch;
/* /*
* prototypes for functions in waiteventset.c * prototypes for functions in waiteventset.c
@ -81,8 +81,9 @@ extern WaitEventSet *CreateWaitEventSet(ResourceOwner resowner, int nevents);
extern void FreeWaitEventSet(WaitEventSet *set); extern void FreeWaitEventSet(WaitEventSet *set);
extern void FreeWaitEventSetAfterFork(WaitEventSet *set); extern void FreeWaitEventSetAfterFork(WaitEventSet *set);
extern int AddWaitEventToSet(WaitEventSet *set, uint32 events, pgsocket fd, extern int AddWaitEventToSet(WaitEventSet *set, uint32 events, pgsocket fd,
Latch *latch, void *user_data); struct Latch *latch, void *user_data);
extern void ModifyWaitEvent(WaitEventSet *set, int pos, uint32 events, Latch *latch); extern void ModifyWaitEvent(WaitEventSet *set, int pos, uint32 events,
struct Latch *latch);
extern int WaitEventSetWait(WaitEventSet *set, long timeout, extern int WaitEventSetWait(WaitEventSet *set, long timeout,
WaitEvent *occurred_events, int nevents, WaitEvent *occurred_events, int nevents,
uint32 wait_event_info); uint32 wait_event_info);