mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
Don't fail the build due to clang integer constant range warnings
This warning checks whether a constant is out of range of the integer type. An example is `comparison of 'u_int' > 4294967295 is always false` and in this case the warning makes sense. However, when the type is a typedef that can be either 64 or 32 bits the if condition is only tautological in some configurations so this should not be a warning that fails the build. Reviewed by: dim Approved by: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D12912
This commit is contained in:
parent
57cd81a357
commit
97a4e58919
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326375
@ -81,6 +81,9 @@ CWARNFLAGS.clang+= -Wno-unused-local-typedef
|
||||
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 40000
|
||||
CWARNFLAGS.clang+= -Wno-address-of-packed-member
|
||||
.endif
|
||||
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 60000
|
||||
CWARNFLAGS.clang+= -Wno-error=tautological-constant-compare
|
||||
.endif
|
||||
.endif # WARNS <= 3
|
||||
.if ${WARNS} <= 2
|
||||
CWARNFLAGS.clang+= -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter
|
||||
|
Loading…
Reference in New Issue
Block a user