G
George Bell
The compiler(gcc) gives me this error
faxGettyApp.c++:596: ANSI C++ forbids implicit conversion from `void *' in
assignment
make[3]: *** [faxGettyApp.o] Error 1
on this code
void
faxGettyApp::setEnvVar(char* var, char* val)
{
char * v;
596 v = malloc( strlen(var) + strlen(val) + 2 );
if ( v == NULL )
traceServer("runGetty: setEnvVar: cannot malloc" );
else
{
sprintf( v, "%s=%s", var, val );
if ( putenv( v ) != 0 )
traceServer("runGetty: putenv: putenv failed" );
}
}
this function is called by:
setenv("ABCDEF", abcd)
where "abcd" is of type fxStr
where fxStr is special class for strings defined in the program.
What does this error mean?
Thanks
George
faxGettyApp.c++:596: ANSI C++ forbids implicit conversion from `void *' in
assignment
make[3]: *** [faxGettyApp.o] Error 1
on this code
void
faxGettyApp::setEnvVar(char* var, char* val)
{
char * v;
596 v = malloc( strlen(var) + strlen(val) + 2 );
if ( v == NULL )
traceServer("runGetty: setEnvVar: cannot malloc" );
else
{
sprintf( v, "%s=%s", var, val );
if ( putenv( v ) != 0 )
traceServer("runGetty: putenv: putenv failed" );
}
}
this function is called by:
setenv("ABCDEF", abcd)
where "abcd" is of type fxStr
where fxStr is special class for strings defined in the program.
What does this error mean?
Thanks
George