]> granicus.if.org Git - postgresql/commit
Suppress implicit-conversion warnings seen with newer clang versions.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 28 Mar 2017 17:16:19 +0000 (13:16 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 28 Mar 2017 17:16:19 +0000 (13:16 -0400)
commit16e815279135ea70616692c8bade43d9f1e1d05e
tree32396e3b780420bd1a8fe028f8de34170ec4f2d6
parent24fc43d40aad5f888f22af9a543113a168a08307
Suppress implicit-conversion warnings seen with newer clang versions.

We were assigning values near 255 through "char *" pointers.  On machines
where char is signed, that's not entirely kosher, and it's reasonable
for compilers to warn about it.

A better solution would be to change the pointer type to "unsigned char *",
but that would be vastly more invasive.  For the moment, let's just apply
this simple backpatchable solution.

Aleksander Alekseev

Discussion: https://postgr.es/m/20170220141239.GD12278@e733.localdomain
Discussion: https://postgr.es/m/2839.1490714708@sss.pgh.pa.us
src/backend/access/transam/xlog.c
src/backend/access/transam/xloginsert.c
src/bin/pg_resetxlog/pg_resetxlog.c