Content-Length: 254000 | pFad | https://github.com/postgrespro/postgres/commit/0065174324a97c0f39ccf0823a81fb674fb49cca

05 Avoid -Wconversion warnings when using checksum_impl.h · postgrespro/postgres@0065174 · GitHub
Skip to content

Commit 0065174

Browse files
committed
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
1 parent 2eb3bc5 commit 0065174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/storage/checksum_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,5 +211,5 @@ pg_checksum_page(char *page, BlockNumber blkno)
211211
* Reduce to a uint16 (to fit in the pd_checksum field) with an offset of
212212
* one. That avoids checksums of zero, which seems like a good idea.
213213
*/
214-
return (checksum % 65535) + 1;
214+
return (uint16) ((checksum % 65536) + 1);
215215
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/postgrespro/postgres/commit/0065174324a97c0f39ccf0823a81fb674fb49cca

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy