When LibreOffice is built using the Clang compiler, it can use also a compiler plugin to provide additional LO-specific warnings. Currently there are a number of warnings generated by this plugin and they should be all fixed. See https://wiki.documentfoundation.org/Development/Clang for information on how to build LO with Clang. See compilerplugins/README in the sources for information about the additional warnings. Currently these are: - unused variable warnings - These are very similar to warnings about basic types the compilers provide on their own. It should be checked whether it's not a mistake that the variable is not used, and the code should be either fixed or the variable removed. - incorrect block indentation - if several statements are in the body of if/while/for statements, they need to be inside {}. The warning points out code the possibly lacks these, although in many cases it is code that is technically correct but just poorly formatted (very common case is writing "else if" on two lines instead of just one). Such code should be either fixed or formatted properly. - log areas - macros such as SAL_INFO and SAL_WARN have a log area as their first argument, which is a string, and this allows selective enabling/disabling. As a protection against mistyping and also to ensure some consistency, a warning is produced for areas that are not listed in sal/inc/sal/log-areas.dox . Code with unknown areas should have either them fixed or added to the list. Note that because of the selective enabling/disabling, there should be one areas for logical area of code, and it should not be overly generic (e.g. 'sw' for the whole of Writer is too broad).
Hi, I've made a patch for this bug, you can find it here: https://gerrit.libreoffice.org/2544
nccuong committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a6b91730053fc61416716ae176081b91de52532b fdo#60148 Clean up warnings from the Clang compiler plugin The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
This is not fixed yet, I can still see a number of warnings.
As you can see from inline comments from https://gerrit.libreoffice.org/2544, we intentionally left some unused variable warnings: all the mutex warnings and some other unused variables are left untouched for debug purpose. Beside, there's one or two false positive from the plugin.
As long as there are any warnings left, this bugreport is still valid by definition. If there are false warnings, those should get fixed. But by the time I wrote comment #3 I did 9a4fb0643e51cb89649000493e8c5dac5a306bc4, which was a valid warning, so I expect there still are more valid warnings. As for warnings left for debug or other purposes, those should be handled somehow too - we do not leave native compiler warnings in the code either.
I cannot see any warnings remaining in current master build, so assuming done, closing.
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup) [NinjaEdit]