Skip to content

False positive result of "read only out and inout parameter" code smell

Copy of titan.EclipsePlug-ins#515 (closed)

The "read only out and inout parameter" code smell of Titanium provides false positive result in the following case:

module test {
 
type port PT message {
  in integer
}
 
type component CT {
  port PT pt
}
 
function f_recv(
  out integer pl_recv 
) runs on CT return boolean {
 
  alt {
    [] pt.receive(?) -> value pl_recv { return true; } // pl_recv is marked, but written here
    [] pt.receive { return false; }
  }
  return false;
}
 
}