Use -Wall compiler warning level

Sets the C and C++ compiler warning level to -Wall. Fixes for
warnings judged to be non-functional are included in this commit.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I783ff274b7fbd802bc25074953e2c2f287114605
diff --git a/environments/arm-linux/default_toolchain_file.cmake b/environments/arm-linux/default_toolchain_file.cmake
index 7a5f33f..85de9df 100644
--- a/environments/arm-linux/default_toolchain_file.cmake
+++ b/environments/arm-linux/default_toolchain_file.cmake
@@ -15,5 +15,12 @@
 string(APPEND CMAKE_C_FLAGS_INIT " -fdiagnostics-show-option -gdwarf-2 -mstrict-align -O0 -DARM64=1")
 string(APPEND CMAKE_CXX_FLAGS_INIT " -fdiagnostics-show-option -gdwarf-2 -mstrict-align -O0 -DARM64=1")
 
+# Set compiler warning level for the root build context. External components
+# are responsible for setting their own warning level.
+if(DEFINED TS_ROOT)
+    string(APPEND CMAKE_C_FLAGS_INIT " -Wall")
+    string(APPEND CMAKE_CXX_FLAGS_INIT " -Wall")
+endif()
+
 include($ENV{TS_ROOT}/tools/cmake/compiler/GCC.cmake REQUIRED)
 include($ENV{TS_ROOT}/tools/cmake/compiler/config_iface.cmake REQUIRED)