Skip to content

Commit 39de4f1

Browse files
committed
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
1 parent 7f7f324 commit 39de4f1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/include/storage/waiteventset.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ typedef struct WaitEvent
7070
/* forward declarations to avoid exposing waiteventset.c implementation details */
7171
typedef struct WaitEventSet WaitEventSet;
7272

73-
typedef struct Latch Latch;
73+
struct Latch;
7474

7575
/*
7676
* prototypes for functions in waiteventset.c
@@ -81,8 +81,9 @@ extern WaitEventSet *CreateWaitEventSet(ResourceOwner resowner, int nevents);
8181
extern void FreeWaitEventSet(WaitEventSet *set);
8282
extern void FreeWaitEventSetAfterFork(WaitEventSet *set);
8383
extern int AddWaitEventToSet(WaitEventSet *set, uint32 events, pgsocket fd,
84-
Latch *latch, void *user_data);
85-
extern void ModifyWaitEvent(WaitEventSet *set, int pos, uint32 events, Latch *latch);
84+
struct Latch *latch, void *user_data);
85+
extern void ModifyWaitEvent(WaitEventSet *set, int pos, uint32 events,
86+
struct Latch *latch);
8687
extern int WaitEventSetWait(WaitEventSet *set, long timeout,
8788
WaitEvent *occurred_events, int nevents,
8889
uint32 wait_event_info);

0 commit comments

Comments
 (0)