Ticket #3434 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

[patch] fix cflags check when using clang compiler

Reported by: and Owned by:
Priority: minor Milestone: 4.8.15
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset: committed-master

Description

fix cflags check when using clang compiler

with clang invalid cflags usage result in exit 0, we expect exit 1

$ clang -c -Wmaybe-uninitialized conftest.c ; echo $?
warning: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Wunknown-warning-option]
1 warning generated.
0

solution with -Werror on cflags check

$ clang -c -Werror -Wmaybe-uninitialized conftest.c ; echo $?
error: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Werror,-Wunknown-warning-option]
1

(tested with clang 3.6)

Signed-off-by: Andreas Mohr <and@…>

Attachments

mc-fix-cflags-check-with-clang.patch (947 bytes) - added by and 5 years ago.

Change History

Changed 5 years ago by and

comment:1 Changed 5 years ago by and

  • Priority changed from major to minor

comment:2 Changed 5 years ago by andrew_b

  • Blocked By 3420 added

comment:3 Changed 5 years ago by andrew_b

  • Blocked By 3420 removed

comment:4 Changed 5 years ago by andrew_b

  • Status changed from new to closed
  • Votes for changeset set to committed-master
  • Resolution set to fixed
  • Milestone changed from Future Releases to 4.8.15
Note: See TracTickets for help on using tickets.