If static has to be kept, a preprocessor can be added for GNU compiler with a function attribution like:
```
#ifdef GNU_COMPILER
static bool generateDiagPrecond (unsigned n, unsigned const*const iA, unsigned const*const jA, 
 				double const*const A, double* diag) __attribute__((unused))
#else
static bool generateDiagPrecond (unsigned n, unsigned const*const iA, unsigned const*const jA, 
 				double const*const A, double* diag) 
#endif
```