[PATCH] D23921: Remove va_start diagnostic false positive with enumerations
Dimitry Andric via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 28 12:03:19 PDT 2016
dim added a subscriber: dim.
dim added a comment.
This works for me. I had two test cases from the FreeBSD source tree which resulted in warnings, e.g.:
cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:388:15: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior
[-Werror,-Wvarargs]
va_start(ap, which);
^
cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:382:66: note: parameter of type 'enum nvlist_prtctl_fmt' is declared here
nvlist_prtctl_dofmt(nvlist_prtctl_t pctl, enum nvlist_prtctl_fmt which, ...)
^
1 error generated.
This fix resolves both of them.
https://reviews.llvm.org/D23921
More information about the cfe-commits
mailing list