pgsql: Fix compiler warnings in test_bitmapset
От | Michael Paquier |
---|---|
Тема | pgsql: Fix compiler warnings in test_bitmapset |
Дата | |
Msg-id | E1v1CLB-002E0q-2W@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Fix compiler warnings in test_bitmapset The macros doing conversions of/from "text" from/to Bitmapset were using arbitrary casts with Datum, something that is not fine since 2a600a93c7be. These macros do not actually need casts with Datum, as they are given already "text" and Bitmapset data in input. They are updated to use cstring_to_text() and text_to_cstring(), fixing the compiler warnings reported by the buildfarm. Note that appending a -m32 to gcc to trigger 32-bit builds was enough to reproduce the warnings here. While on it, outer parenthesis are added to TEXT_TO_BITMAPSET(), and inner parenthesis are removed from BITMAPSET_TO_TEXT(), to make these macros more consistent with the style used in the tree, based on suggestions by Tom Lane. Oversights in commit 00c3d87a5cab. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Author: Greg Burd <greg@burd.me> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/3027069.1758606227@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f83fe65f3fc1cae177f6c75f7b38eb951dd217b5 Modified Files -------------- src/test/modules/test_bitmapset/test_bitmapset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
В списке pgsql-committers по дате отправления: