diff options
author | Michael Paquier | 2020-03-05 05:12:37 +0000 |
---|---|---|
committer | Michael Paquier | 2020-03-05 05:12:37 +0000 |
commit | 0065174324a97c0f39ccf0823a81fb674fb49cca (patch) | |
tree | 6d184e5fe92d7074b126b9f2a10676b2c0cb4e17 | |
parent | 2eb3bc58814fa1ab86308a3658ddb76081080db3 (diff) |
Avoid -Wconversion warnings when using checksum_impl.h
This does not matter much when compiling Postgres proper as many
warnings exist when enabling this compilation flag, but it can be
annoying for external modules willing to use both.
Author: David Steele
Discussion: https://postgr.es/m/[email protected]
-rw-r--r-- | src/include/storage/checksum_impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/storage/checksum_impl.h b/src/include/storage/checksum_impl.h index 0f264dfe4c..2f81cdf5b5 100644 --- a/src/include/storage/checksum_impl.h +++ b/src/include/storage/checksum_impl.h @@ -211,5 +211,5 @@ pg_checksum_page(char *page, BlockNumber blkno) * Reduce to a uint16 (to fit in the pd_checksum field) with an offset of * one. That avoids checksums of zero, which seems like a good idea. */ - return (checksum % 65535) + 1; + return (uint16) ((checksum % 65536) + 1); } |