473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Error: "va_start used in function with fixed args"

I am using the vfprintf in my application. I am using count for va_list.

char *p;
va_list temp;
va_start(temp, p + sizeof(void *));
vfprintf(fd, format, temp);
va_end(temp);

In this code, I am getting compilation for "va_start used in function with fixed args"

Could you please give me input to get rid of this error??
Apr 8 '10 #1
2 12884
Banfa
9,065 Expert Mod 8TB
va_start is intended to be used on the parameters of a varidac function.

Calling it on local variables is likely to have indeterminate results or undefined behaviour as that is not how va_start was designed to be used. Your stack based variables may be held in a different manor to your function parameters on any given platform.
Apr 9 '10 #2
Correct. I haven't use that option previously. But I have noticed that sizeof(va_list) on 64-bit is 24 bytes.

I am using the char * as a argument list i.e. 8 bytes. Is this cause an error in compilation?
Apr 14 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sean Anderson | last post by:
It seems I lack an understanding of varible (sorry, field) scope and need human feedback. I have read 5 books on java and everything in the help of my development tool says this should work fine,...
3
by: Sergey | last post by:
Hi, Randomly I get an error "Function returned |" while trying to upload a file in ASP application, use FileUp server- side component from SoftWare Artisans ... can't find any references to...
1
by: Ajax Chelsea | last post by:
1,int (*f)(int a = 1);//is it legal? 2,int (*f)(int a = 1); int g(int a = 2){return 0;} f = &g;//is it legal?
4
by: J. Campbell | last post by:
From reading this forum, it is my understanding that C++ doesn't require the compiler to keep code that does not manifest itself in any way to the user. For example, in the following: { for(int...
5
by: deko | last post by:
After developing an MDB in Access 2003 on WS03, then making it into an MDE and deploying it on a WinXP box with Access 2003 installed, I get this error: Function is not available in expressions...
0
by: . | last post by:
http://daviderognoni.blogspot.com?locawapp - MAIN NEWS =========== * add thread * add "Request" object * new "locawapp_main" function * fixed files.py
7
by: runsun pan | last post by:
I wanna check if an object is the *arguments* object of a function, is that possible? When we do: typeof(arguments) it always returns "object", doesn't seem to be helpful.
5
by: Guillermo | last post by:
Hi, This must be very basic, but how'd you pass the same *args several levels deep? def func2(*args) print args # ((1, 2, 3),) # i want this to output (1, 2, 3) as func1!
1
by: gops | last post by:
Hi. I am noob in python. while reading some source code I came across , this funny thing called @ in some function , def administrator(method): @functools.wraps(method) def wrapper(self,...
8
by: ssecorp | last post by:
I first learned about OO from Java. I much prefer to program in Python though. However I am consufed about 2 things. 1. Why do I have to pass self into every method in a class? Since I am...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.