build: make compiler warning options compatible with clang

This patch updates m4/compiler-warnings.m4 as follows to make it more
compatible with clang:

* clang doesn't support -Wunused-but-set-variable, which can be replaced
  with -Wunused-variable as the latter covers unused variables with or
  without an assigned value and is supported by gcc and clang.

* -Wno-unused-function is added to let clang ignore unused functions that
  are auto-generated.
1 file changed