From: Prarit Bhargava on
gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2240#note_1241...
I have tested this change by doing 'make V=1' for setting ENABLE_WERROR=1,
ENABLE_WERROR=(nothing) in Makefile variables, and looking at the gcc
output for an in-kernel file, as well as compiling an out-of-tree
module. In those cases I verified that
ENABLE_ERROR=1 out-of-tree module results in no -Werror flag
ENABLE_ERROR=(empty) out-of-tree module results in no -Werror flag
ENABLE_ERROR=1 in kernel tree file results in a -Werror flag
ENABLE_ERROR=(empty) in kernel tree file results in no -Werror flag
as expected.
@hertonrk-rh, it turns out that I didn't need to do the -Wno-error hack.
Simply removing the flag this way works very well.
@jmflinuxtx, please re-review.