iferr warn_unused_result missed
C4DS last edited by
After "successfully" converting plugins to R20 on Windows I took all source files to build the plugins on macOS, resulting in one error after the other where Xcode 9.2 reports:
ignoring return value of function declared with 'warn_unused_result' attribute
In the meantime I am familiar seeing this message and know it is because I simply implemented and maxon::BaseArray
Resize, or a
CopyFrom... or something related, without checking on the return value of the function.
Visual Studio already complained while I was converting the source code to R20 and compiling now and then. So, I knew it was related to adding some
Visual Studio didn't complain any further, but apparently Xcode goes a little further and brings up a lot of code still containing append/erase/... which doesn't use any iferr.
As such, I was wondering what makes Xcode find these while Visual Studio missed them?
Except for differences between the Visual Studio
projectdefinition.txtare identical, since the same file is used for both platforms.
It's not a big deal, but just a hassle since I have to convert the source code to R20 on Windows, then basically do the same again on macOS.
Hi @C4DS, unfortunately, it's not my main domain so I will ask you to wait until 7th January, where my other colleagues would be able to confirm what I say.
In Windows and Mac Os we do not use the same compiler, and the Mac OS one is more restrictive than the windows one.
So you either have to add the
iferror iferr_ignore to remember why you didn't want to check the return state.