Acknowledged

SDK Connect Iq 4.2.0 Beta 2 - Provide a way to ignore individual compiler warnings

Request: provide a way to mark a line of code to not generate a warning (I still would like to receive warnings but not for the lines that I already have evaluated or where warnings can not be solved )

The sdk 4.2.0 beta 2 brings some extra intelligence to detect unused local variables, however in 2 cases this is annoying.

Case 1: a try / catch, where you only care about program flow and don't care about the error message

       try {
            // do logic
            return someValue;
        }
        catch(e) {
            return null;
        }
The above will result in the warning "Local variable e is not used" and you need to type something in between the catch clause....
Case 2: excludedannotation logic  (+Case 3: inheritance tree where you provide calls to functions that you are going to define in the derived classes)
    (:not_history_chart
    function getIterator (bChart)
    {}
In the not_history_chart case this is just a dummy function, I don't have an actual implementation, so of course the bChart variable is not used. 
(This particular function in Case 2 will actually never be called for devices belonging to the not_history_chart case, so preferably I would not type this dummy function call at all, but due to a bug since 4.1.6 sdk we have to in order to satisfy the compiler, but that's another bug, I've made a seperate report for that) 
 

Parents
  • Another case are onStart(state) and onStop(state) in the appbase class.  state gets flagged as an unused local in both cases.  Maybe for these as well as the catch(e) case, function parameters shouldn't be flagged as unused locals

Comment
  • Another case are onStart(state) and onStop(state) in the appbase class.  state gets flagged as an unused local in both cases.  Maybe for these as well as the catch(e) case, function parameters shouldn't be flagged as unused locals

Children
No Data