Dead Local Store

This smell occurs when a statement assigns a value to a local variable which is not used in any subsequent instruction. A variant of the smell occurs when a return statement assigns a value to a local variable which is not used in any subsequent instruction. (i.e. return(x=1); )

Reference

A. Vetro, L. Ardito, G. Procaccianti, M. Morisio, “Definition, Implementation and Validation of Energy Code Smells: An Exploratory Study on an Embedded System”. ENERGY 2013, pp. 34-39.


Energy Smells

Home

All rights reserved (c) Tushar Sharma 2017-23.