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: 8af2565)
Fix compiler warning on typedef redeclaration
2024年2月23日 15:39:27 +0000 (17:39 +0200)
2024年2月23日 15:39:27 +0000 (17:39 +0200)
bulk_write.c:78:3: error: redefinition of typedef 'BulkWriteState' is a C11 feature [-Werror,-Wtypedef-redefinition]
} BulkWriteState;
^
../../../../src/include/storage/bulk_write.h:20:31: note: previous definition is here
typedef struct BulkWriteState BulkWriteState;
^
1 error generated.

Per buildfarm animals 'sifaka' and 'longfin'.

Discussion: https://www.postgresql.org/message-id/9e1f63c3-ef16-404c-b3cb-859a96eaba39@iki.fi


diff --git a/src/backend/storage/smgr/bulk_write.c b/src/backend/storage/smgr/bulk_write.c
index 04a76ec5e36721b4395287f81054e0be0edfb520..4a10ece4c396b283de4826247a1f4e31acab681f 100644 (file)
--- a/src/backend/storage/smgr/bulk_write.c
+++ b/src/backend/storage/smgr/bulk_write.c
@@ -57,7 +57,7 @@ typedef struct PendingWrite
/*
* Bulk writer state for one relation fork.
*/
-typedef struct BulkWriteState
+struct BulkWriteState
{
/* Information about the target relation we're writing */
SMgrRelation smgr;
@@ -75,7 +75,7 @@ typedef struct BulkWriteState
XLogRecPtr start_RedoRecPtr;
MemoryContext memcxt;
-} BulkWriteState;
+};
static void smgr_bulk_flush(BulkWriteState *bulkstate);
diff --git a/src/include/storage/bulk_write.h b/src/include/storage/bulk_write.h
index 6d4532d05e18b7b0b3925af7eb5774938be71bbb..cf6f6fcb3f2868686149c8ba2b88c3f75d758fde 100644 (file)
--- a/src/include/storage/bulk_write.h
+++ b/src/include/storage/bulk_write.h
@@ -17,6 +17,7 @@
#include "storage/smgr.h"
#include "utils/rel.h"
+/* Bulk writer state, contents are private to bulk_write.c */
typedef struct BulkWriteState BulkWriteState;
/*
This is the main PostgreSQL git repository.
RSS Atom

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