diff --git a/core/SConscript.boardloader b/core/SConscript.boardloader index 07073f032b..d995298631 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 c38168919a..5dc8f3049d 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 75a899aca6..cc0a7cea96 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 77075f8934..b84d406934 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 b3c59f6508..d4a06d3e94 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 754563150a..d94c6dd27e 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 1c5f1672fe..17ce496aa3 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 65500c4b3e..f1e6ad9a34 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 610c2d1e9e..bc0a675be8 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 = ../../../