Skip to content

Commit 9f56219

Browse files
IsThisLosskpavlov00
authored andcommitted
fix upg: disable c99 warn about flexible array
Disable warning introduced in 2fad38a --- Pull Request resolved: #1166 Co-authored-by: kpavlov00 <kpavlov00@yandex-team.com> commit_hash:462134674cf55abff30daf615d55edc92f0da1ba
1 parent a3890c9 commit 9f56219

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

postgresql/src/storages/postgres/detail/cancel.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ typedef struct {
2222

2323
#if USERVER_LIBPQ_VERSION >= 180000
2424

25+
#ifdef __clang__
26+
#pragma clang diagnostic push
27+
#pragma clang diagnostic ignored "-Wc99-extensions"
28+
#endif
29+
2530
struct pg_cancel {
2631
SockAddr raddr; /* Remote address */
2732
int be_pid; /* PID of to-be-canceled backend */
@@ -38,6 +43,10 @@ struct pg_cancel {
3843
char cancel_req[/*FLEXIBLE_ARRAY_MEMBER*/]; /* CancelRequestPacket */
3944
};
4045

46+
#ifdef __clang__
47+
#pragma clang diagnostic pop
48+
#endif
49+
4150
#else
4251

4352
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)

0 commit comments

Comments
 (0)