Merge pull request #22719 from akien-mga/ci-werror
Travis: Enable 'werror' for X11 and Android builds
This commit is contained in:
commit
3ca2afc09c
2 changed files with 4 additions and 13 deletions
|
@ -29,7 +29,7 @@ matrix:
|
||||||
- clang-format-6.0
|
- clang-format-6.0
|
||||||
- libstdc++6 # >= 4.9 needed for clang-format-6.0
|
- libstdc++6 # >= 4.9 needed for clang-format-6.0
|
||||||
|
|
||||||
- env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc EXTRA_ARGS="module_mono_enabled=yes mono_glue=no"
|
- env: PLATFORM=x11 TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc EXTRA_ARGS="module_mono_enabled=yes mono_glue=no werror=yes"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
addons:
|
addons:
|
||||||
|
@ -49,7 +49,7 @@ matrix:
|
||||||
build_command: "scons p=x11 -j2 $OPTIONS"
|
build_command: "scons p=x11 -j2 $OPTIONS"
|
||||||
branch_pattern: coverity_scan
|
branch_pattern: coverity_scan
|
||||||
|
|
||||||
- env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang
|
- env: PLATFORM=x11 TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="werror=yes"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
addons:
|
addons:
|
||||||
|
@ -57,7 +57,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- *linux_deps
|
- *linux_deps
|
||||||
|
|
||||||
- env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang
|
- env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="werror=yes"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
|
||||||
|
|
|
@ -89,17 +89,8 @@ void *Memory::alloc_static(size_t p_bytes, bool p_pad_align) {
|
||||||
atomic_increment(&alloc_count);
|
atomic_increment(&alloc_count);
|
||||||
|
|
||||||
if (prepad) {
|
if (prepad) {
|
||||||
// Clang 5 wrongly complains about 's' being unused,
|
|
||||||
// while it's used to modify 'mem'.
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wunused-variable"
|
|
||||||
#endif // __clang__
|
|
||||||
uint64_t *s = (uint64_t *)mem;
|
uint64_t *s = (uint64_t *)mem;
|
||||||
*s = p_bytes;
|
*s = p_bytes;
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
#endif // __clang__
|
|
||||||
|
|
||||||
uint8_t *s8 = (uint8_t *)mem;
|
uint8_t *s8 = (uint8_t *)mem;
|
||||||
|
|
||||||
|
@ -181,9 +172,9 @@ void Memory::free_static(void *p_ptr, bool p_pad_align) {
|
||||||
|
|
||||||
if (prepad) {
|
if (prepad) {
|
||||||
mem -= PAD_ALIGN;
|
mem -= PAD_ALIGN;
|
||||||
uint64_t *s = (uint64_t *)mem;
|
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
|
uint64_t *s = (uint64_t *)mem;
|
||||||
atomic_sub(&mem_usage, *s);
|
atomic_sub(&mem_usage, *s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue