Uninitialized state variable: remove var init at declaration

pull/62/head
Josselin 6 years ago
parent 452811e1ee
commit 517a73ca33
  1. 2
      slither/detectors/variables/uninitialized_state_variables.py

@ -48,7 +48,7 @@ class UninitializedStateVarsDetection(AbstractDetector):
def detect_uninitialized(self, contract): def detect_uninitialized(self, contract):
written_variables = self.written_variables(contract) written_variables = self.written_variables(contract)
return [(variable, contract.get_functions_reading_from_variable(variable)) return [(variable, contract.get_functions_reading_from_variable(variable))
for variable in contract.state_variables if variable not in written_variables] for variable in contract.state_variables if variable not in written_variables and not variable.expression]
def detect(self): def detect(self):
""" Detect uninitialized state variables """ Detect uninitialized state variables

Loading…
Cancel
Save