Turn off -Wunused-parameter for include "nrf_soc.h"

Unfortunately we can't turn it off just while nrf_soc.h is being included
as the way the defines are used the compiler can't tell the parameters
are unused until the end of the compilation unit.  So we can't use the
more normal

as that pops the supression too early.

WARNING: including nrf_soc.h will turn off unused-function warnings for
the rest of the compilation unit - see included nrf_svc.h
Robert May 8 years ago
parent 1a1a5976a8
commit 9591ef40dc

@ -1,4 +1,18 @@
#include "MicroBit.h"
* Turn off unused-parameter warnings under gcc -Wall
* This turns them off for the entire compilation unit
* (i.e. the whole of this file) as the compiler can't
* tell that a parameter is unused until the end, and
* so we can't just turn it off as a guard around the
* next include.
* It might be better to add
* #pragram GCC system header
* as the first line of nrf_soc.h, but that's a different
* module ...
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "nrf_soc.h"