Opened 6 years ago

Closed 6 years ago

#77 closed enhancement (fixed)

Ignore assignments when checking for unused local definitions

Reported by: phdmakk Owned by: phdmakk
Priority: major Milestone: v2.0.0 Series
Component: T3Q Version: 2.0
Keywords: Cc:

Description

A warning shall be raised when a local definition is only used in an assignment where a value is assigned to it.

An example is as follows:

function f_Function2() {
   var boolean v_Dummy := true; // Does cause a "checkNoUnusedLocalDefinitions" warning 
}
function f_Function3() {
   var boolean v_Dummy;
   v_Dummy := true; // Does not cause a "checkNoUnusedLocalDefinitions" warning 
}

While technically v_Dummy is "used" in f_Function3, the assigned value is never referenced afterwards. T3Q shall ignore assignments as "uses" for local definitions and raise warnings when the assigned values are never used.

Change History (2)

comment:1 Changed 6 years ago by phdmakk

  • Owner set to phdmakk
  • Status changed from new to accepted

comment:2 Changed 6 years ago by phdmakk

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.