https://bugs.freedesktop.org/show_bug.cgi?id=60148

          Priority: medium
            Bug ID: 60148
          Assignee: [email protected]
           Summary: Clean up warnings from the Clang compiler plugin
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: unspecified
         Component: Libreoffice
           Product: LibreOffice

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).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to