Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
28 user(s) are online (19 user(s) are browsing Forums)

Members: 2
Guests: 26

hlt, NinjaCyborg, more...

Support us!

Headlines

 
  Register To Post  

« 1 2 (3)
Re: Issues / Observatons with the new SDK 53.13
Just can't stay away
Just can't stay away


See User information
@Coder

If you're compiling with startup code then you don't need to open "dos.library" yourself as this is done for you by the startup code, so just remove any "dos.library" opening code you may have added.

If you need to make sure that you have a new enough version of "dos.library" you can do this just as well after it's been opened:
#include <dos/dos.h>
#include <proto/dos.h>

int main () {
    if (
DOSBase->lib_Version MIN_DOS_VERSION) {
        
Printf("Unsupported dos.library version\n");
        return 
RETURN_FAIL;
    }
    
/* ... */
    
return RETURN_OK;
}

Go to top
Re: Issues / Observatons with the new SDK 53.13
Home away from home
Home away from home


See User information
@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.

Go to top
Re: Issues / Observatons with the new SDK 53.13
Not too shy to talk
Not too shy to talk


See User information
@all

Are there still devs using SDK 53.13? I'd have thought everyone had migrated to 53.15 by now... :-/

Valiant@Camelot
AmigaOne XE, 800Mhz, 1GB, 9250 Radeon, OS4.1u7
Sam440ep, 666Mhz, 512Mb, 9250 Radeon, OS4.1u6
A1-X1000, 1.8Ghz, 1GB, 9250 Radeon, OS4.1x
A1-X5000/40 2.2Ghz, 2GB, Radeon HD 7700, OS4.1 FE ud 2
Go to top
Re: Issues / Observatons with the new SDK 53.13
Just popping in
Just popping in


See User information
@salass00

Call me a sucker for doing it all myself.

Coder

Go to top

  Register To Post
« 1 2 (3)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project