From 8cca5a79f1cf1e978bdfc97bcd9c878f960694f0 Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Wed, 18 Sep 2019 15:32:37 +0100 Subject: [PATCH] Remove -Wmissing-declarations warning from WARNING1 level A function declaration declares the name of the function and the type of the parameter it returns. A function prototype is a function declaration that also specifies the type of the arguments of the function. Essentially, a function prototype helps the compiler ensure whether the function call matches the return type and the right number/type of arguments of function. A function prototype itself serves as a function declaration for new style functions. The warning flag -wmissing-prototype is good enough to check for missing function prototype and is exhaustive compared to -wmissing-declaration, therefore making the later redundant. Note that, at this point, these flags are part of WARNING1 which is not used for TF-A build by default. Several platforms use upstream libraries (such as zlib etc) which are in old style c code. After the TF-A build process is restructred using CMake framework, we plan to enable WARNING1, WARNING2 and WARNING3 incrementally as the new build platform can compile each BL binary of a particular platform with set of unique compilation flags. Change-Id: I9c6bf9da74e0840e4d2624bc12376e199953c213 Signed-off-by: Justin Chadwell --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 54d332cd7..ef3ee4b53 100644 --- a/Makefile +++ b/Makefile @@ -248,7 +248,6 @@ WARNINGS := -Wall -Wmissing-include-dirs -Wunused \ # Additional warnings # Level 1 WARNING1 := -Wextra -WARNING1 += -Wmissing-declarations WARNING1 += -Wmissing-format-attribute WARNING1 += -Wmissing-prototypes WARNING1 += -Wold-style-definition