lib: coding style cleanups + fix printing of CAN_ERR_CNT #208
Annotations
3 errors and 1 warning
Analyze (cpp)
This version of the CodeQL Action was deprecated on January 18th, 2023, and is no longer updated or supported. For better performance, improved security, and new features, upgrade to v2. For more information, see https://github.blog/changelog/2023-01-18-code-scanning-codeql-action-v1-is-now-deprecated/
|
Analyze (cpp)
We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. Failure invoking /opt/hostedtoolcache/CodeQL/0.0.0-20230105/x64/codeql/cpp/tools/autobuild.sh with arguments .
Exit code 1 and error was:
+ TOOLS_DIR=/opt/hostedtoolcache/CodeQL/0.0.0-20230105/x64/codeql/cpp/tools
+ /opt/hostedtoolcache/CodeQL/0.0.0-20230105/x64/codeql/cpp/tools/detect_source_root
+ '[' -L _lgtm_detected_source_root ']'
++ readlink _lgtm_detected_source_root
+ cd .
+ export CXXFLAGS=-fpermissive
+ CXXFLAGS=-fpermissive
+ configure_prefix_opt=
+ '[' -f configure.ac ']'
+ configure_prefix_opt=--prefix=/usr
+ '[' -f CMakeLists.txt ']'
+ mkdir -p _lgtm_build_dir
+ cd _lgtm_build_dir
+ CMAKE_WRAPPER=/opt/work/autobuild/cmake-wrapper
+ '[' -x /opt/work/autobuild/cmake-wrapper ']'
+ CMAKE_WRAPPER=cmake
+ cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_DOCS=OFF -DCATKIN_ENABLE_TESTING=OFF -DBUILD_DOCUMENTATION=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-fpermissive ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_DOCS
BUILD_DOCUMENTATION
CATKIN_ENABLE_TESTING
CMAKE_CXX_FLAGS
+ exit 0
+ export VERBOSE=1
+ VERBOSE=1
+ '[' -L _lgtm_detected_source_root ']'
++ readlink _lgtm_detected_source_root
+ cd .
+ '[' -d _lgtm_build_dir ']'
+ cd _lgtm_build_dir
+ '[' -f SConstruct ']'
+ '[' -f wscript ']'
+ '[' -f Makefile ']'
+ make
/home/runner/work/can-utils/can-utils/mcp251xfd/mcp251xfd-regmap.c: In function ‘do_mcp251xfd_regmap_read’:
/home/runner/work/can-utils/can-utils/mcp251xfd/mcp251xfd-regmap.c:38:25: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
38 | fscanf(reg_file, "%*[^\n]\n");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/can-utils/can-utils/lib.c: In function ‘fprint_canframe’:
/home/runner/work/can-utils/can-utils/lib.c:264:9: error: expected declaration specifiers before ‘sprint_canframe’
264 | sprint_canframe(buf, cf, sep, maxdlen);
| ^~~~~~~~~~~~~~~
/home/runner/work/can-utils/can-utils/lib.c:265:9: error: expected declaration specifiers before ‘fprintf’
265 | fprintf(stream, "%s", buf);
| ^~~~~~~
/home/runner/work/can-utils/can-utils/lib.c:266:9: error: expected declaration specifiers before ‘if’
266 | if (eol)
| ^~
/home/runner/work/can-utils/can-utils/lib.c:268:1: error: expected declaration specifiers before ‘}’ token
268 | }
| ^
/home/runner/work/can-utils/can-utils/lib.c:271:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
271 | {
| ^
/home/runner/work/can-utils/can-utils/lib.c:343:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
343 | {
| ^
/home/runner/work/can-utils/can-utils/lib.c:359:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
359 | {
| ^
/home/runner/work/can-utils/can-utils/lib.c:491:20: error: storage class specified for parameter ‘error_classes’
491 | static const char *error_classes[] = {
| ^~~~~~~~~~~~~
/home/runner/work/can-utils/can-utils/lib.c:491:1: error: parameter ‘error_classes’ is initialized
491 | static const char *error_classes[] = {
| ^~~~~~
/home/runner/work/can-utils/can-utils/lib.c:492:9: warning: initialization of ‘const char **’ from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types]
492 | "tx-timeout",
| ^~~~~~~~~~~~
/home/runner/work/can-utils/can-utils/lib.c:492:9: note: (near initialization for ‘error_classes’)
/home/runner/work/can-utils/can-utils/lib.c:493:9: warning: excess elements in scalar
|
Analyze (cpp)
This version of the CodeQL Action was deprecated on January 18th, 2023, and is no longer updated or supported. For better performance, improved security, and new features, upgrade to v2. For more information, see https://github.blog/changelog/2023-01-18-code-scanning-codeql-action-v1-is-now-deprecated/
|
Analyze (cpp)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, github/codeql-action/init@v1, github/codeql-action/autobuild@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|