Issue:
g++ latest version throws errors for type conversions without a cast and structure initializations being in the incorrect order. Adding -fpermissive will ignore the type conversions but the structure initializations must be fixed for the wolfHSM to compile.
To reproduce:
In the example/posix/wh_posix_client and server makefiles remove the c90/c99 definitions and set CC = g++. Type make.
g++ version used is g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Note:
The compiler errors thrown are largely code quality issues. No errant behavior was observed in the compiled program with -fpermissive or with a c90 compiler. Pointer casts can cause architecture dependent errors and thus addressing the errors may benefit ports. Consistent structure ordering primarily reduces user error.