Voodooprojects
VoodooHDA => General Discussion => Topic started by: girafx on January 23, 2010, 01:24:20 PM
-
Error when building VoodooHDA 0.2.2 for 10.6
warning: deprecated conversion from string constant to 'char*'
in line
void VoodooHDADevice::dumpNodes(FunctionGroup *funcGroup)
{
static char *ossname[] = SOUND_DEVICE_NAMES;
...
Any idea?
-
turn off warnings as errors.
-
Due to compatibility with C you could use char* as string constants, but it is not C++ proper and is now deprecated in gcc. So basically you should change char* to const char*.
-
Thanks! I used const before the wrong definitions and it worked for 60 from 64 errors.
Could you give your advice on this lines
error: assignment of read-only location
dumpAmp(widget->params.outAmpCap, "Output");
The second yet with deprication:
warning: deprecated conversion from string constant to 'char*'
control->widget->connsenable[control->index] = 0;
-
You can also use casts...
Check my version (above) to see how I fixed it up for SL
basically this means the following:
foo = "STRING";
becomes
foo = (char *)"STRING";
This will remove those warnings.
The SL version I made allready has all of these fixed...
-
You can also use casts...
Casting is bad programming because you override the type checking. Of course sometimes it is required, but I recommend to avoid it wherever possible.
-
Casts solved the problem!
Thnx
But yet there is error in linecontrol->widget->connsenable[control->index] = 0;
/Users/user/voodoohda.googlecode.com SVN/Parser.cpp:1028:0 /Users/user/voodoohda.googlecode.com SVN/Parser.cpp:1028: error: assignment of read-only location
-
Zip the sources and mail them to me on the following e-mail addres:
andyvand@gmail.com
I'll see what I can do for you...
-
Just look in my sources (One back, the one for Tiger, Leopard and Snow Leopard) to see how I fixed that issue...
It won't be much trouble to apply the same to latest SVN...