I read from http://proguard.sourceforge.net/manual/usage.html about the use of assumenosideeffects
. My question refers to the following paragraph:
-assumenosideeffects class_specification Specifies methods that don't have any side effects (other than maybe returning a value). In the optimization step, ProGuard will then remove calls to such methods, if it can determine that the return values aren't used. ProGuard will analyze your program code to find such methods automatically. It will not analyze library code, for which this option can therefore be useful. For example, you could specify the method System.currentTimeMillis(), so that any idle calls to it will be removed. With some care, you can also use the option to remove logging code. Note that ProGuard applies the option to the entire hierarchy of the specified methods. Only applicable when optimizing. In general, making assumptions can be dangerous; you can easily break the processed code. Only use this option if you know what you're doing!
I would need to understand how does ProGuard determine "that the return values aren't used". In particular, if the method calls do not return any value, are they always removed?