Skip to content

PGPRO-5646: remove compiler warning (gcc 11.2.0) #11

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion engine.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -394,7 +394,17 @@ ptrackCheckpoint(void)
*
* Write both magic and varsion_num at once.
*/
ptrack_write_chunk(ptrack_tmp_fd, &crc, (char *) &ptrack_map->magic,

/*
* Previously we read from the field magic, now we read from the beginning
* of the structure PtrackMapHdr. Make sure nothing has changed since then.
*/
StaticAssertStmt(
offsetof(PtrackMapHdr, magic) == 0,
"old write format for PtrackMapHdr.magic and PtrackMapHdr.version_num "
"is not upward-compatible");

ptrack_write_chunk(ptrack_tmp_fd, &crc, (char *) ptrack_map,
offsetof(PtrackMapHdr, init_lsn));

init_lsn = pg_atomic_read_u64(&ptrack_map->init_lsn);
Expand Down