1 #include <stdio.h> 2 #include <stdarg.h> 3 4 void 5 test_vsprintf(int unused, ...) 6 { 7 char buf[512]; 8 volatile int rv; 9 va_list ap; 10 11 va_start(ap, unused); 12 13 /* This expression cannot be folded. */ 14 rv = vsprintf(buf, "%s", ap); 15 16 va_end(ap); 17 } 18 19 int 20 main(int argc, char **argv) 21 { 22 test_vsprintf(0, argv[0]); 23 24 return (1); 25 } 26