git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f7f324)
Fix compiler warnings about typedef redefinitions
Thu, 6 Mar 2025 01:10:22 +0000 (03:10 +0200)
Thu, 6 Mar 2025 01:10:22 +0000 (03:10 +0200)
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


diff --git a/src/include/storage/waiteventset.h b/src/include/storage/waiteventset.h
index 9947491b6192facd577a65e3d97a41eb06c76550..aa65b7a35e77fd9892c61c76667e36be60362fa1 100644 (file)
--- a/src/include/storage/waiteventset.h
+++ b/src/include/storage/waiteventset.h
@@ -70,7 +70,7 @@ typedef struct WaitEvent
/* forward declarations to avoid exposing waiteventset.c implementation details */
typedef struct WaitEventSet WaitEventSet;
-typedef struct Latch Latch;
+struct Latch;
/*
* prototypes for functions in waiteventset.c
@@ -81,8 +81,9 @@ extern WaitEventSet *CreateWaitEventSet(ResourceOwner resowner, int nevents);
extern void FreeWaitEventSet(WaitEventSet *set);
extern void FreeWaitEventSetAfterFork(WaitEventSet *set);
extern int AddWaitEventToSet(WaitEventSet *set, uint32 events, pgsocket fd,
- Latch *latch, void *user_data);
-extern void ModifyWaitEvent(WaitEventSet *set, int pos, uint32 events, Latch *latch);
+ struct Latch *latch, void *user_data);
+extern void ModifyWaitEvent(WaitEventSet *set, int pos, uint32 events,
+ struct Latch *latch);
extern int WaitEventSetWait(WaitEventSet *set, long timeout,
WaitEvent *occurred_events, int nevents,
uint32 wait_event_info);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /