~toabctl/modemmanager/trunk

Viewing all changes in revision 5815.

  • Committer: Dan Williams
  • Date: 2019-04-02 15:48:40 UTC
  • Revision ID: git-v1:88fac7f14a8898a7856a6868bbd94d4cf576723a
build: fix -Wunused-but-set-variable support and handle clang better

By default the build used -Wno-unused-but-set-variable but that's
clearly not what we want. Fix those problems.

When using clang, the compiler doesn't error on unknown compile
options, so let's add -Werror to the checking too.

CC='clang'
configure:3408: checking for gcc
configure:3435: result: clang
...
configure:17644: checking whether gcc understands -Wno-unused-but-set-variable
configure:17657: clang -c -Wall -std=gnu89 -g -O2 -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wstrict-prototypes -Wno-unused-parameter -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-but-set-variable  conftest.c >&5
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
1 warning generated.
configure:17657: $? = 0
configure:17666: result: yes

Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: