mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-06 21:25:05 -05:00
Add a way to control the level of checks in the code
Add a new ASSUME_MASK option, which allows for some control over the checks used in libfdt. With all assumptions enabled, libfdt assumes that the input data and parameters are all correct and that internal errors cannot happen. By default no assumptions are made and all checks are enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Message-Id: <20200220214557.176528-3-sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
0c5326cb28
commit
464962489d
2 changed files with 109 additions and 1 deletions
6
Makefile
6
Makefile
|
|
@ -16,7 +16,11 @@ EXTRAVERSION =
|
|||
LOCAL_VERSION =
|
||||
CONFIG_LOCALVERSION =
|
||||
|
||||
CPPFLAGS = -I libfdt -I .
|
||||
# Control the assumptions made (e.g. risking security issues) in the code.
|
||||
# See libfdt_internal.h for details
|
||||
ASSUME_MASK ?= 0
|
||||
|
||||
CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
|
||||
WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
|
||||
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
|
||||
CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue