Skip to content

Commit

Permalink
Fix compiler warnings on macOS (#9319)
Browse files Browse the repository at this point in the history
## Problem

On macOS:
```
/Users/runner/work/neon/neon//pgxn/neon/file_cache.c:623:19: error: variable 'has_remaining_pages' is used uninitialized whenever 'for' loop exits because its condition is false [-Werror,-Wsometimes-uninitialized]
```

## Summary of changes
- Initialise `has_remaining_pages` with `false`
  • Loading branch information
bayandin authored Oct 8, 2024
1 parent 16417d9 commit baf27ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pgxn/neon/file_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ lfc_evict(NRelFileInfo rinfo, ForkNumber forkNum, BlockNumber blkno)
*/
if (entry->bitmap[chunk_offs >> 5] == 0)
{
bool has_remaining_pages;
bool has_remaining_pages = false;

for (int i = 0; i < CHUNK_BITMAP_SIZE; i++)
{
Expand Down

1 comment on commit baf27ba

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5085 tests run: 4878 passed, 0 failed, 207 skipped (full report)


Flaky tests (4)

Postgres 17

Postgres 16

Postgres 15

Code coverage* (full report)

  • functions: 31.4% (7506 of 23933 functions)
  • lines: 49.6% (60286 of 121609 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
baf27ba at 2024-10-08T17:31:18.486Z :recycle:

Please sign in to comment.