From e06e2fdce1f6124c3a31b1ba9a5a9115b25e86ff Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 27 Jun 2017 00:23:26 +0200 Subject: drivers/spi: Don't disable non-existent warnings on clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning -Wstack-usage= doesn't seem to exist on clang, so trying to disable it makes the compiler unhappy about non-existent pragmas. Catching this on gcc is good enough, so let's disable it for the clang case Change-Id: Ia3716a83ba41743ac1dbe73e70abd170de30d7ab Signed-off-by: Stefan Reinauer Reviewed-on: https://review.coreboot.org/20383 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Patrick Georgi --- src/drivers/spi/spi_flash.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c index c145379e1a..04bea35402 100644 --- a/src/drivers/spi/spi_flash.c +++ b/src/drivers/spi/spi_flash.c @@ -84,7 +84,9 @@ static int spi_flash_cmd_read(const struct spi_slave *spi, const u8 *cmd, /* TODO: This code is quite possibly broken and overflowing stacks. Fix ASAP! */ #pragma GCC diagnostic push +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic ignored "-Wstack-usage=" +#endif int spi_flash_cmd_write(const struct spi_slave *spi, const u8 *cmd, size_t cmd_len, const void *data, size_t data_len) { -- cgit v1.2.3