Not checking return values is bad practice! We should instead check the return value of this function and react accordingly.

Regards,
Tino

eric b wrote:
Hi,

Still trying to remove warnings, my log said :


/Users/ericb/Desktop/AQUAVCL19/vcl/aqua/source/app/salinst.cxx: In function 'SalInstance* CreateSalInstance()': /Users/ericb/Desktop/AQUAVCL19/vcl/aqua/source/app/salinst.cxx:288: warning: unused variable 'rc


Well, looking at salinst.cxx, line 288 I found :

OSStatus rc = InstallEventLoopTimer(GetMainEventLoop(), 1, 0, eventLoopTimer, pInst, &pInst->mEventLoopTimerRef);

And rc is never used :-/



I propose to replace the line above, using a simple :

InstallEventLoopTimer(GetMainEventLoop(), 1, 0, eventLoopTimer, pInst, &pInst->mEventLoopTimerRef);



Of course, no more warnings, and it works without any problem. Ok for the change ?


Other warning :

/Users/ericb/Desktop/AQUAVCL19/vcl/aqua/source/app/salinst.cxx: In function 'void SetFilterCallback(void*, void*)': /Users/ericb/Desktop/AQUAVCL19/vcl/aqua/source/app/salinst.cxx:207: warning: unused variable 'pSalData'

But I still have no idea on how SetFilterCallback() is used


Eric Bachard







--

It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change.

Charles Darwin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to