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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Avoid mixing void and integer in a conditional expression.
Дата
Msg-id E1vFbvi-004iJg-0n@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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 <chris@chrullrich.net>
Author: Bryan Green <dbryan.green@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/cc4ef8db-f8dc-4347-8a22-e7ebf44c0308@chrullrich.net
Backpatch-through: 13

Branch
------
REL_14_STABLE

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

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


В списке pgsql-committers по дате отправления: