From 76eefd026f6c291e787390b459ac38f96c122d5f Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 11 Oct 2019 09:59:32 +0200 Subject: [PATCH] all: let's use -Wno-missing-braces because clang does not respect initialization of structs with = {0}; --- core/SConscript.boardloader | 2 +- core/SConscript.bootloader | 2 +- core/SConscript.firmware | 2 +- core/SConscript.prodtest | 2 +- core/SConscript.reflash | 2 +- core/SConscript.unix | 2 +- crypto/Makefile | 1 + legacy/Makefile.include | 1 + storage/tests/c/Makefile | 2 +- 9 files changed, 9 insertions(+), 7 deletions(-) diff --git a/core/SConscript.boardloader b/core/SConscript.boardloader index 07073f032..d99529863 100644 --- a/core/SConscript.boardloader +++ b/core/SConscript.boardloader @@ -103,7 +103,7 @@ env.Replace( CCFLAGS='$COPT ' '-g3 ' '-nostdlib ' - '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -fno-common ' + '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -Wno-missing-braces -fno-common ' '-fsingle-precision-constant -fdata-sections -ffunction-sections ' '-ffreestanding ' '-fstack-protector-all ' diff --git a/core/SConscript.bootloader b/core/SConscript.bootloader index c38168919..5dc8f3049 100644 --- a/core/SConscript.bootloader +++ b/core/SConscript.bootloader @@ -126,7 +126,7 @@ env.Replace( CCFLAGS='$COPT ' '-g3 ' '-nostdlib ' - '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -fno-common ' + '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -Wno-missing-braces -fno-common ' '-fsingle-precision-constant -fdata-sections -ffunction-sections ' '-ffreestanding ' '-fstack-protector-all ' diff --git a/core/SConscript.firmware b/core/SConscript.firmware index 75a899aca..cc0a7cea9 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -362,7 +362,7 @@ env.Replace( CCFLAGS='$COPT ' '-g3 ' '-nostdlib ' - '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -fno-common ' + '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -Wno-missing-braces -fno-common ' '-fsingle-precision-constant -fdata-sections -ffunction-sections ' '-ffreestanding ' '-fstack-protector-all ' diff --git a/core/SConscript.prodtest b/core/SConscript.prodtest index 77075f893..b84d40693 100644 --- a/core/SConscript.prodtest +++ b/core/SConscript.prodtest @@ -103,7 +103,7 @@ env.Replace( CCFLAGS='$COPT ' '-g3 ' '-nostdlib ' - '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -fno-common ' + '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -Wno-missing-braces -fno-common ' '-fsingle-precision-constant -fdata-sections -ffunction-sections ' '-ffreestanding ' '-fstack-protector-all ' diff --git a/core/SConscript.reflash b/core/SConscript.reflash index b3c59f650..d4a06d3e9 100644 --- a/core/SConscript.reflash +++ b/core/SConscript.reflash @@ -100,7 +100,7 @@ env.Replace( CCFLAGS='$COPT ' '-g3 ' '-nostdlib ' - '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -fno-common ' + '-std=gnu99 -Wall -Werror -Wdouble-promotion -Wpointer-arith -Wno-missing-braces -fno-common ' '-fsingle-precision-constant -fdata-sections -ffunction-sections ' '-ffreestanding ' '-fstack-protector-all ' diff --git a/core/SConscript.unix b/core/SConscript.unix index 754563150..d94c6dd27 100644 --- a/core/SConscript.unix +++ b/core/SConscript.unix @@ -331,7 +331,7 @@ env.Replace( COPT=env.get('OPTIMIZE', env.get('ENV').get('OPTIMIZE', '-Os')), CCFLAGS='$COPT ' '-g3 ' - '-std=gnu99 -Wall -Werror -Wuninitialized ' + '-std=gnu99 -Wall -Werror -Wuninitialized -Wno-missing-braces ' '-fdata-sections -ffunction-sections ' + CCFLAGS_MOD, CCFLAGS_QSTR='-DNO_QSTR -DN_X64 -DN_X86 -DN_THUMB', LIBS=['m'], diff --git a/crypto/Makefile b/crypto/Makefile index 1c5f1672f..17ce496aa 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -21,6 +21,7 @@ CFLAGS += $(OPTFLAGS) \ -Winit-self \ -Wuninitialized \ -Wformat-security \ + -Wno-missing-braces \ -Werror VALGRIND ?= 1 diff --git a/legacy/Makefile.include b/legacy/Makefile.include index 65500c4b3..f1e6ad9a3 100644 --- a/legacy/Makefile.include +++ b/legacy/Makefile.include @@ -56,6 +56,7 @@ CFLAGS += $(OPTFLAGS) \ -Winit-self \ -Wuninitialized \ -Wformat-security \ + -Wno-missing-braces \ -Werror \ -fno-common \ -fno-exceptions \ diff --git a/storage/tests/c/Makefile b/storage/tests/c/Makefile index 610c2d1e9..bc0a675be 100644 --- a/storage/tests/c/Makefile +++ b/storage/tests/c/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -Wall -Wshadow -Wextra -Wpedantic -Werror -fPIC +CFLAGS = -Wall -Wshadow -Wextra -Wpedantic -Werror -Wno-missing-braces -fPIC LIBS = INC = -I ../../../crypto -I ../.. -I . BASE = ../../../