Skip to content

Commit 2e78cd9

Browse files
committedDec 10, 2021
stdarg: use sysv varargs when we build with coverity
cov-analysis-linux64-2020.09 is a lot more successful than the older versions at building, but it still has some... issues. Among them, it is of the belief that this: void foo(char *fmt, ...) { __builtin_va_list ap; __builtin_ms_va_start(ap, fmt); /* <- here */ ... } is an uninitialized use of "ap". This patch adds defined(__COVERITY__) to the list of criteria for using sysv va lists, which it has no such confusion about. Signed-off-by: Peter Jones <[email protected]>
1 parent 0dd4c78 commit 2e78cd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎include/system/stdarg.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ typedef __builtin_va_list __builtin_sysv_va_list;
2424
#endif
2525

2626
#if defined(__aarch64__) || defined(__arm__) || defined(__i386__) || \
27-
defined(__i486__) || defined(__i686__)
27+
defined(__i486__) || defined(__i686__) || defined(__COVERITY__)
2828

2929
typedef __builtin_va_list ms_va_list;
3030
typedef __builtin_va_list __builtin_ms_va_list;

0 commit comments

Comments
 (0)