@salass00
Quote:
Quote:
ffmpegGUI.c:1955: warning: value computed is not used
Line 1955 reads: RA_Iconify(objects[OID_MAIN]);
Should I be using something different?
Quote:
To get rid of the compiler warning you should change the code to:
(void)RA_Iconify(objects[OID_MAIN]);
The warning is because the RA_Iconify macro casts the return value from the IDoMethod function, hence it's a "computed value".
NOOOO! What is the point of a compiler issueing a warning if you just 'gag it' with a random cast to void?
In this case the macro does cast to BOOL as you say, this is because (from autodoc):
RESULT
Returns non-zero if successful or 0 on error.
So test it for success!
A correct way to eliminate this warning would be
if(RA_Iconify(...))
{
/* handle any consequances of iconification */
/* eg intuition window pointers will be invalid next time you open */
}
else
{
/* handle failure */
}
To reiterate handling a warning by casting to void or void * is more likely to create a bug or at least hide it from view and make it hard to find when it 'strikes' than anything else.