I have previously used the VisiGenieSpark library with a Photon and a 4DSystems display.
A recent attempt to transfer the application to a B524 SOM led to numerous error messages. I stripped the codeback to a very basic test program which just attempted to reset the display.
This simple step led to fatal errors in the library code. Is this a consequence of changes to Device OS, a previously unrecognised error in the code that is now detected by the Web IDE or a blunder on my part?
lib/VisiGenieSpark/VisiGenieSpark.cpp:522:1: no return statement in function returning non-void [-Werror=return-type]
lib/VisiGenieSpark/VisiGenieSpark.cpp:290:1: control reaches end of non-void function [-Werror=return-type]
This error was previously detected but merely treated as warning.
However promising to return a value and then failing to keep that promise always was a naughty thing to do
The simple solution is to find the offending function(s) and add a return xxx statement as last instruction in the function. So whenever none of the conditional paths (already containing a return statement) are taken you code passes that ultimate return statement.
I found two functions that fail to return some value in at least one code path