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

Answer by wangsir for How to remove this warning: second parameter of...

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);...

View Article


Answer by mishmashru for How to remove this warning: second parameter of...

I think there is a confusion here: most of people only deal with prinf-like functionsh which have format and varargs. and they think they have to pass parameter name which describes format. however...

View Article

Answer by user9876 for How to remove this warning: second parameter of...

second parameter of ‘va_start’ not last named argumentWhat does it means and how to remove it?Your function has named parameters parent, fmt and size. The C spec says you have to always pass the last...

View Article

Answer by Sergey Kalinichenko for How to remove this warning: second...

You need to use size instead of fmt:va_start(args, size);It is size, not fmt, that is the last parameter that has an explicit name (as opposed to vararg parameters, which have no names). You need to...

View Article

How to remove this warning: second parameter of ‘va_start’ not last named...

I have a function (see below) that is emitting the following warning:second parameter of ‘va_start’ not last named argumentWhat does it means and how to remove it?The function is as the...

View Article

Browsing all 5 articles
Browse latest View live




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