android - supress warnings: dead code and conditional compilation -


i declare constants conditionally compile/not compile chunks of code. put these constants on 1 class, use them along (big) app code.

conf.java

    public static final int gui_actionbar_height=0; 

elsewhere (example):

super.oncreate(savedinstancestate, conf.gui_actionbar_height==0?r.layout.activity_funq_play_noactionbar:r.layout.activity_funq_play, true); 

however, triggers warning "comparing identical expressions" in case shown. it's can live with, i'd know if there's supresswarning magic rid of (and yellow warning icon in sourcecode).

@supresswarnings ("unused")  

doesnt't trick.

this java compilation warning , toggling on/off depends on ide. assuming using eclipse, can navigate configurations preferences > java > compiler > errors/warning > comparing identical values ('x==x') 'ignore' should turn off.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -