Bug 1816737 - silence warning spam in (third-party) zlib code r=glandium

zlib still uses K&R-style function declarations. As of clang 15, these
are warned about by default, as they've been removed in the latest draft
of C2x; this results in thousands(?) of lines of warnings when building
zlib in-tree.

An issue has been filed at https://github.com/madler/zlib/issues/633,
but the author has stated that they are unwilling to change this until
C2x has actually been published.

For now, just silence those warnings when building zlib.

Differential Revision: https://phabricator.services.mozilla.com/D169842
This commit is contained in:
Ray Kraesig 2023-02-17 01:29:01 +00:00
Родитель 10ed72a61e
Коммит 9163e54e6a
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -37,3 +37,7 @@ SOURCES += [
# We allow warnings for third-party code that can be updated from upstream.
AllowCompilerWarnings()
# ... most warnings, anyway. https://github.com/madler/zlib/issues/633
if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
CFLAGS += ["-Wno-deprecated-non-prototype"]