Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc, ARM-Gcc and Doxygen #38

Closed
stoesselt opened this issue Jul 3, 2018 · 6 comments
Closed

gcc, ARM-Gcc and Doxygen #38

stoesselt opened this issue Jul 3, 2018 · 6 comments

Comments

@stoesselt
Copy link

Hi, the idea is to be able to recognize compiler warnings as well. Compiler warnings can also be seen as static code analysis results providing valuable hints where problems can hide.

In an environment of continuous integration, various builds with different compiler flags can be executed ending in possibly different warnings. Also compilation with different compilers may be necessary. Adding support for compiler warnings in this lib would eliminate the need to compile these things manually and enable to comment on pull requests for compiler warnings (Bitbucket Server in my case).

In detail, as I am working on C++ projects, I am very interested in support for GCC compiler and Doxygen generation warnings.

@tomasbjerre
Copy link
Owner

Can you provide some output from GCC and Doxygen?

@stoesselt
Copy link
Author

stoesselt commented Jul 3, 2018

Example output:
gcc 7.3.0:

../../../pump/source/util/FormattedDate.cpp:82:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../../pump/source/util/profile/profile_function_overlay.cpp:112:25: warning: variable 'exceedingDuration' set but not used [-Wunused-but-set-variable]

ARM-Gcc (4.9 2015q3):

../../external/specific/arm/cmsis/arm_math.h:5774:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../../external/generic/boost/boost/type_traits/intrinsics.hpp:321:0: warning: "BOOST_HAS_TRIVIAL_DESTRUCTOR" redefined
../../external/generic/boost/boost/type_traits/intrinsics.hpp:128:0: note: this is the location of the previous definition
../../source/startup/controller/DebugConsole.c:49:5: error: 'dmax' undeclared (first use in this function)

Doxygen has the ability to change the warning format. The default format is: "$file:$line: $text". Doxygen:

./pump/external/specific/arm/cmsis_dsp/StatisticsFunctions/arm_min_q7.c:48: warning: argument 'index' of command @param is not found in the argument list of arm_min_q7(q7_t *pSrc, uint32_t blockSize, q7_t *pResult, uint32_t *pIndex)
./pump/external/specific/arm/stm32f4xx/libinc/stm32f4xx_flash.h:354: warning: The following parameters of FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState) are not documented:
 parameter 'NewState'
./pump/external/specific/arm/stm32f4xx/libsrc/stm32f4xx_gpio.c:518: warning: End of list marker found without any preceding list items

@stoesselt
Copy link
Author

You are right. A particularitiy of Doxygen is that there are warning messages over multiple lines (2nd warning).

@tomasbjerre tomasbjerre changed the title Enhancement: Consider compiler warnings as well gcc, ARM-Gcc and Doxygen Jul 4, 2018
tomasbjerre added a commit that referenced this issue Jul 4, 2018
tomasbjerre added a commit that referenced this issue Jul 4, 2018
tomasbjerre added a commit that referenced this issue Jul 4, 2018
@tomasbjerre
Copy link
Owner

I implementing it without supporting the whole message from Doxygen. Perhaps someone can add that later. Now I'm just including the first line because that was a very simple thing to support. And it is supported with the CLANG parser.

@tomasbjerre
Copy link
Owner

Released in the plugins now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants