C nitpick about pgwin32_dispatch_queued_signals()

Christian Ullrich <chris@chrullrich.net>

From: Christian Ullrich <chris@chrullrich.net>
To: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-02T13:05:47Z
Lists: pgsql-hackers
Hello,

the current MSVC compiler deems it necessary to issue

	warning C4053: one void operand for '?:'

for a line with CHECK_FOR_INTERRUPTS(). This boils down to this bit of 
miscadmin.h (line 116 in master):

	#define INTERRUPTS_PENDING_CONDITION() \
		(unlikely(UNBLOCKED_SIGNAL_QUEUE()) ?
			pgwin32_dispatch_queued_signals() : 0, \
		 unlikely(InterruptPending))
	#endif

The C spec says that of the possible results of the :? operator, either 
none or both can be void, and pgwin32_dispatch_queued_signals() is void
(and has been as far back as I can find it).

Does that matter?


-- 
Christian

Commits

  1. Avoid mixing void and integer in a conditional expression.