Bug 1396892 - turn off -Wtautological-pointer-compare in memory/build/ for Android; r=njn

clang warns about this code in mozmemory_wrap.c in the reimplementation
of vasprintf, complaining that `fmt` cannot be null:

    if (str == NULL || fmt == NULL) {
                       ^~~    ~~~~

clang is apparently exploiting knowledge about the requirements of
vasprintf here, but defensive programming on the part of our
reimplementation seems like the wiser course.  Let's turn off the
warning.
This commit is contained in:
Nathan Froyd 2017-09-07 08:20:12 -04:00
Родитель b281ca80cd
Коммит c88ec30451
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -34,6 +34,11 @@ Library('memory')
if CONFIG['MOZ_GLUE_IN_PROGRAM']:
DIST_INSTALL = True
if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang':
CFLAGS += [
'-Wno-tautological-pointer-compare',
]
# Keep jemalloc separated when mozglue is statically linked
if CONFIG['MOZ_MEMORY'] and CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
FINAL_LIBRARY = 'mozglue'