what is unreferenced local variable
warning C4101: hbrush'' : unreferenced local variable
warning C4101: ''ps'' : unreferenced local variable
the program still runs but gets this warning???
void some_fubar(int a, int b)
{
int NOT_USED;
return(a*b);
}
In the above example NOT_USED would be an unreferenced local variable.
Basically the function has a parameter or declares a local variable that is not used in it.
{
int NOT_USED;
return(a*b);
}
In the above example NOT_USED would be an unreferenced local variable.
Basically the function has a parameter or declares a local variable that is not used in it.
That meen that you have allocated space on the stack for a variable that never was used in the function. It doesn''t really matter, if you remove the variables the program will still run as fine it did with them. Even better as you will not pollute the stack as much. Example:
Update GameDev.net system time campaign - success at last
void foo(){ int bar; // warning C4101: bar'' : unreferenced local variable}
Update GameDev.net system time campaign - success at last
Arguing on the internet is like running in the Special Olympics: Even if you win, you're still retarded.[How To Ask Questions|STL Programmer's Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement