Skip to content

Commit

Permalink
[#25658] build: Fix GCC compile
Browse files Browse the repository at this point in the history
Summary:
634567d / D40823 appeared to have landed an older diff than the last tested one, leading
to the following compile error on GCC builds:

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
../../../../../../../src/postgres/src/backend/utils/misc/yb_query_diagnostics.c:126:49: error: missing braces around initializer [-Werror=missing-braces]
  126 | static QueryConstantsMetadata query_constants = {0, 0, {0}};
      |                                                 ^
      |                                                         {}
cc1: all warnings being treated as errors
```

This fixes the compile error.
Jira: DB-14918

Test Plan: Jenkins: urgent, compile only

Reviewers: asaha, ishan.chhangani, mhaddad

Reviewed By: mhaddad

Subscribers: yql, ybase

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D41293
  • Loading branch information
es1024 committed Jan 16, 2025
1 parent 77bee70 commit 2fb3171
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/postgres/src/backend/utils/misc/yb_query_diagnostics.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ TimestampTz *yb_pgss_last_reset_time;
YbPgssFillInConstantLengths yb_qd_fill_in_constant_lengths = NULL;

/* session variables */
static QueryConstantsMetadata query_constants = {0, 0, {0}};
static QueryConstantsMetadata query_constants = {
.stmt_location = 0,
.count = 0,
.locations = {{0, 0}}
};

/* shared variables */
static HTAB *bundles_in_progress = NULL;
Expand Down

0 comments on commit 2fb3171

Please sign in to comment.