Add -Wno-error=implicit-fallthrough and -Wno-error=format-nonliteral so that
ngtcp2 builds with clang 20
[1972/4994] Compiling third_party/ngtcp2/lib/ngtcp2_objalloc.c
../../third_party/ngtcp2/lib/ngtcp2_rtb.c:1120:7: error:
unannotated fall-through between switch labels
[-Werror,-Wimplicit-fallthrough]
1120 | case NGTCP2_ECN_STATE_UNKNOWN:
| ^
../../third_party/ngtcp2/lib/ngtcp2_rtb.c:1120:7: note:
insert '__attribute__((fallthrough));' to silence this warning
1120 | case NGTCP2_ECN_STATE_UNKNOWN:
| ^
| __attribute__((fallthrough));
../../third_party/ngtcp2/lib/ngtcp2_rtb.c:1120:7: note:
insert 'break;' to avoid fall-through
1120 | case NGTCP2_ECN_STATE_UNKNOWN:
| ^
| break;
1 error generated.
../../third_party/ngtcp2/lib/ngtcp2_log.c:818:35: error:
format string is not a string literal [-Werror,-Wformat-nonliteral]
818 | n = vsnprintf(buf, sizeof(buf), fmt, ap);
| ^~~
1 error generated.
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Aug 13 03:58:43 UTC 2025 on atb-devel-224
conf.ADD_NAMED_CFLAGS('LIBNGTCP2_UNPICKY_CFLAGS',
'-Wno-error=strict-overflow',
testflags=True)
+ conf.ADD_NAMED_CFLAGS('LIBNGTCP2_UNPICKY_CFLAGS',
+ '-Wno-error=format-nonliteral',
+ testflags=True)
+ conf.ADD_NAMED_CFLAGS('LIBNGTCP2_UNPICKY_CFLAGS',
+ '-Wno-error=implicit-fallthrough',
+ testflags=True)
conf.DEFINE('HAVE_LIBNGTCP2', '1')
return