↧
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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleHow 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
More Pages to Explore .....