mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-09 02:51:21 +00:00
docs: describe the new warning levels
When -Wextra was added, the warning levels changed their meaning. Add a description in the build option section and leave the security hardening section as mostly a pointer to it. Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: Iabf2f598d0bf3e865c9b991c5d44d2acb9572bd5
This commit is contained in:
parent
d141e63844
commit
291be198fa
2 changed files with 48 additions and 32 deletions
|
@ -131,38 +131,9 @@ Several build options can be used to check for security issues. Refer to the
|
|||
overflows.
|
||||
|
||||
- The ``W`` build flag can be used to enable a number of compiler warning
|
||||
options to detect potentially incorrect code.
|
||||
|
||||
- W=0 (default value)
|
||||
|
||||
The ``Wunused`` with ``Wno-unused-parameter``, ``Wdisabled-optimization``
|
||||
and ``Wvla`` flags are enabled.
|
||||
|
||||
The ``Wunused-but-set-variable``, ``Wmaybe-uninitialized`` and
|
||||
``Wpacked-bitfield-compat`` are GCC specific flags that are also enabled.
|
||||
|
||||
- W=1
|
||||
|
||||
Adds ``Wextra``, ``Wmissing-format-attribute``, ``Wmissing-prototypes``,
|
||||
``Wold-style-definition`` and ``Wunused-const-variable``.
|
||||
|
||||
- W=2
|
||||
|
||||
Adds ``Waggregate-return``, ``Wcast-align``, ``Wnested-externs``,
|
||||
``Wshadow``, ``Wlogical-op``.
|
||||
|
||||
- W=3
|
||||
|
||||
Adds ``Wbad-function-cast``, ``Wcast-qual``, ``Wconversion``, ``Wpacked``,
|
||||
``Wpointer-arith``, ``Wredundant-decls`` and
|
||||
``Wswitch-default``.
|
||||
|
||||
Refer to the GCC or Clang documentation for more information on the individual
|
||||
options: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html and
|
||||
https://clang.llvm.org/docs/DiagnosticsReference.html.
|
||||
|
||||
NB: The ``Werror`` flag is enabled by default in TF-A and can be disabled by
|
||||
setting the ``E`` build flag to 0.
|
||||
options to detect potentially incorrect code. TF-A is tested with ``W=0`` but
|
||||
it is recommended to develop against ``W=2`` (which will eventually become the
|
||||
default).
|
||||
|
||||
.. rubric:: References
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue