Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 00833b9

Browse files
committed
Merge pull request swiftlang#400 from briancroom/fix-debug-assert-macro
Fix the CFAssert macro when used with no format string parameters
2 parents 70d58cb + f0e7409 commit 00833b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CoreFoundation/Base.subproj/CFInternal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ CF_PRIVATE CFIndex __CFActiveProcessorCount();
176176
#define __CFAssert(cond, prio, desc, ...) \
177177
do { \
178178
if (!(cond)) { \
179-
CFLog(prio, CFSTR(desc), __VA_ARGS__); \
179+
CFLog(prio, CFSTR(desc), ##__VA_ARGS__); \
180180
HALT; \
181181
} \
182182
} while (0)
@@ -187,7 +187,7 @@ CF_PRIVATE CFIndex __CFActiveProcessorCount();
187187
#endif
188188

189189
#define CFAssert(condition, priority, description, ...) \
190-
__CFAssert((condition), (priority), description, __VA_ARGS__)
190+
__CFAssert((condition), (priority), description, ##__VA_ARGS__)
191191

192192
#define __kCFLogAssertion 3
193193

0 commit comments

Comments
 (0)