Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd26997c

Browse files
committed
Avoid mixing void and integer in a conditional expression.
The C standard says that the second and third arguments of aconditional operator shall be both void type or both not-voidtype. The Windows version of INTERRUPTS_PENDING_CONDITION()got this wrong. It's pretty harmless because the result ofthe operator is ignored anyway, but apparently recent versionsof MSVC have started issuing a warning about it. Silence thewarning 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.netBackpatch-through: 13
1 parent4c0b7bd commitd26997c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/include/miscadmin.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ extern void ProcessInterrupts(void);
112112
(unlikely(InterruptPending))
113113
#else
114114
#defineINTERRUPTS_PENDING_CONDITION() \
115-
(unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0, \
115+
(unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? \
116+
pgwin32_dispatch_queued_signals() : (void) 0, \
116117
unlikely(InterruptPending))
117118
#endif
118119

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp