clang-tidy: Add Tag Names to Anonymous Structs
The following errors were reported during clang-tidy enablement due to
anonymous non-C-compatible types being given names for linkage purposes
by typedef declarations. This fix addresses the issue by adding tag
names to the anonymous structs, making them compatible with C.
'''
pid/ec/pid.hpp:20:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror
pid/ec/pid.hpp:11:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror
'''
Tested: Build and unit testing verified.
Change-Id: I1a998d23b515f2ff570867935cc1a6c8b040f4b1
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/pid/ec/pid.hpp b/pid/ec/pid.hpp
index bc81504..ac77f05 100644
--- a/pid/ec/pid.hpp
+++ b/pid/ec/pid.hpp
@@ -8,7 +8,7 @@
namespace ec
{
-typedef struct
+typedef struct limits_t
{
double min = 0.0;
double max = 0.0;
@@ -17,7 +17,7 @@
/* Note: If you update these structs you need to update the copy code in
* pid/util.cpp and the initialization code in pid/buildjson.hpp files.
*/
-typedef struct
+typedef struct pid_info_t
{
bool initialized = false; // has pid been initialized
bool checkHysterWithSetpt = false; // compare current input and setpoint to