MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.
The log output instances all named "log_output" in backends
collide with the "log_output" parameter of various functions.
This renames the variables in the backends to make them
more descriptive. Same goes for the buffers for some of
these instances as they are all named "buf", and "hostname"
being used in the network backend, so they are renamed.
There are a few places where variables are overriden within
an inner scope (e.g. inside loop and if block) so they are
also renamed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This construction was causing errors with recent gccs. If you look
carefully, it's generating the sequence:
simcall
mov a2, a2
mov a3, a3
...which is nonsensical. And now gcc is complaining about it with:
subsys/logging/log_backend_xtensa_sim.c:44:2:
error: invalid hard register usage between output operands
Just emit a single simcall instruction and let the assembly
constraints do their job.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Ensure that RTT and xtensa_sim backends are using single byte
log_output buffer.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>