←back to thread

327 points AareyBaba | 2 comments | | HN request time: 0s | source
Show context
time4tea ◴[] No.46184345[source]
a = a; // misra

Actual code i have seen with my own eyes. (Not in F-35 code)

Its a way to avoid removing an unused parameter from a method. Unused parameters are disallowed, but this is fine?

I am sceptical that these coding standards make for good code!

replies(11): >>46184442 #>>46184460 #>>46184571 #>>46185232 #>>46185373 #>>46186276 #>>46186377 #>>46186457 #>>46186510 #>>46186705 #>>46189488 #
jjmarr ◴[] No.46186276[source]
An unused parameter should be commented out.
replies(1): >>46186665 #
1. MobiusHorizons ◴[] No.46186665[source]
Unless it’s there to conform to an interface
replies(1): >>46186797 #
2. jjmarr ◴[] No.46186797[source]
Especially if it's there to conform to an interface. You can comment out the variable name and leave the type.