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 Sergey Kalinichenko for How to remove this warning: second parameter of ‘va_start’ not last named argument?

$
0
0

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 pass the last named parameter to va_start in order for it to figure out the address in memory at which the vararg parameters start.


Viewing all articles
Browse latest Browse all 5

Trending Articles



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