Quantcast
Channel: How to remove this warning: second parameter of ‘va_start’ not last named argument? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by wangsir for How to remove this warning: second parameter of ‘va_start’ not last named argument?

$
0
0

I have the same problem on Ubuntu20.04,Contrary to the answer with the most likes,the code at the beginning,

void sprintf(char *str, char *fmt, ...) {    va_list list;    int i, len;    va_start(list, 2);    ...}

and then, the code as follows

void sprintf(char *str, char *fmt, ...) {    va_list list;    int i, len;    va_start(list, fmt);    ...}

Problem was sovled.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>