From 8cfeaecfc76a7366b336272bc76e96e09281b133 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 28 Mar 2017 13:16:19 -0400 Subject: 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/bin/pg_resetwal/pg_resetwal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/pg_resetwal/pg_resetwal.c') diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index 27bd9b04e7c..bcb9ed938f5 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -1095,7 +1095,7 @@ WriteEmptyXLOG(void) record->xl_rmid = RM_XLOG_ID; recptr += SizeOfXLogRecord; - *(recptr++) = XLR_BLOCK_ID_DATA_SHORT; + *(recptr++) = (char) XLR_BLOCK_ID_DATA_SHORT; *(recptr++) = sizeof(CheckPoint); memcpy(recptr, &ControlFile.checkPointCopy, sizeof(CheckPoint)); -- cgit v1.2.3