Skip to content

Commit 9adb58a

Browse files
committed
Remove implicit cast from 'void *'
Commit e2809e3 added code to a header which assigns a pointer to void to a pointer to unsigned char. This causes build errors for extensions written in C++. Fix by adding an explicit cast. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CANWCAZaCq9AHBuhs%3DMx7Gg_0Af9oRU7iAqr0itJCtfmsWwVmnQ%40mail.gmail.com Backpatch-through: 18
1 parent 3369a3b commit 9adb58a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/port/pg_crc32c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pg_comp_crc32c_dispatch(pg_crc32c crc, const void *data, size_t len)
7272
{
7373
if (__builtin_constant_p(len) && len < 32)
7474
{
75-
const unsigned char *p = data;
75+
const unsigned char *p = (const unsigned char *) data;
7676

7777
/*
7878
* For small constant inputs, inline the computation to avoid a

0 commit comments

Comments
 (0)