diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-06-27 00:23:26 +0200 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-06-27 17:00:55 +0000 |
commit | e06e2fdce1f6124c3a31b1ba9a5a9115b25e86ff (patch) | |
tree | 9a35a7117cdb75e5ed4e1e946d86d79e04236338 | |
parent | 8e6bb80e9a71cf07be8310fc8ce582e700f69c6d (diff) | |
download | coreboot-e06e2fdce1f6124c3a31b1ba9a5a9115b25e86ff.tar.xz |
drivers/spi: Don't disable non-existent warnings on clang
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 <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20383
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r-- | src/drivers/spi/spi_flash.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |