nasa / fpp

F Prime Prime: A modeling language for F Prime
https://fprime.jpl.nasa.gov
Apache License 2.0
46 stars 31 forks source link

Fix shadow variables #381

Closed JohanBertrand closed 7 months ago

JohanBertrand commented 7 months ago

More details in https://github.com/nasa/fprime/pull/2482

Fixes in the code generation to remove -Wshadow warnings:

JohanBertrand commented 7 months ago

Thanks!

I originally changed the names of the variables in the fpp files, because I thought we should not advise users to add a m prefix in front of the variables they defined.

bocchino commented 7 months ago

I think it's OK in the context of a unit test. In real code, a struct member name should say what the member does. In a unit test context, it seems fine to call a U32 member mU32, since it really has no purpose except to be a U32 member in the context of that test.