mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
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/91d86c8a-11fc-7b88-43eb-5ca3f6fb8bd3@pgmasters.net
This commit is contained in:
parent
2eb3bc5881
commit
0065174324
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user