pgsql: Avoid mixing void and integer in a conditional expression.

Поиск
Список
Период
Сортировка
Искать

pgsql: Avoid mixing void and integer in a conditional expression.

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Avoid mixing void and integer in a conditional expression.

The C standard says that the second and third arguments of a
conditional operator shall be both void type or both not-void
type.  The Windows version of INTERRUPTS_PENDING_CONDITION()
got this wrong.  It's pretty harmless because the result of
the operator is ignored anyway, but apparently recent versions
of MSVC have started issuing a warning about it.  Silence the
warning by casting the dummy zero to void.

Reported-by: Christian Ullrich 
Author: Bryan Green 
Reviewed-by: Tom Lane 
Discussion: https://postgr.es/m/cc4ef8db-f8dc-4347-8a22-e7ebf44c0308@chrullrich.net
Backpatch-through: 13

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d5e9c7115027a310ee6c4023c340a9c4adc1f26c

Modified Files
--------------
src/include/miscadmin.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

FAQ