Page MenuHomePhabricator

cxx: remove compilation warnings in C++ code, from both gcc and clang
ClosedPublic

Authored by vitor.sousa on Jul 10 2019, 3:57 PM.

Details

Summary

Remove almost all the compilation warnings from C++ code. Only explicit
warnings using the #warning preprocessor directive remain.

Some warnings had to be suppressed with #pragma directives because the
behavior they were warning about is intended in some specific places.
Code comments were added in such situations.

Added a generator that creates #pragma directives in order to suppress
warnings in all generated C++ headers.
Currently -Wignored-qualifiers is the only warning category being suppressed.
The innocuous const qualifiers that it points are inoffensive and have
no effect in compilation at all.
They are also hard to track in generation since they can emerge from different
types in many places.

To ease the generation of the warning suppressors an utility constructor was
added to efl::eolian::grammar::attributes::unused_type.

Add constructors to eolian_mono::class_context to default initialize its
internal string and avoid field initialization warnings.

Test Plan

meson test

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vitor.sousa created this revision.Jul 10 2019, 3:57 PM
vitor.sousa requested review of this revision.Jul 10 2019, 3:57 PM
zmike accepted this revision.Jul 12 2019, 6:07 AM
This revision is now accepted and ready to land.Jul 12 2019, 6:07 AM
This revision was automatically updated to reflect the committed changes.