From 76564aaeffc6c2080a10df9fbca4fedf202aa73b Mon Sep 17 00:00:00 2001
From: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
Date: Tue, 18 Jul 2023 12:40:35 +0300
Subject: [PATCH] Suppress H2O compilation warnings (#15378)

* Suppress H2O compilation warnings

* Fix typo

* Update flags

* Another fix typo

* Flags update once more

* Remove duplicate flag

* Move flag
---
 Makefile.am  | 2 +-
 configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cd0a50696e..84bf4c9da9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1059,7 +1059,7 @@ if ENABLE_H2O
 noinst_LIBRARIES += libh2o.a
 
 # until h2o updates support for OpenSSL 3.0 we silence the warnings
-libh2o_a_CFLAGS = $(CFLAGS) -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -DH2O_USE_LIBUV=0 $(libh2o_a_INCLUDES)
+libh2o_a_CFLAGS = $(CFLAGS) -Wno-old-style-declaration -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -DH2O_USE_LIBUV=0 $(libh2o_a_INCLUDES)
 
 if LINUX
     libh2o_a_CFLAGS += -D_GNU_SOURCE
diff --git a/configure.ac b/configure.ac
index 362358b7b4..d2f047e61b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -908,7 +908,7 @@ if test "${enable_h2o}" != "no"; then
 
     if test "${can_build_h2o}" = "yes"; then
         AC_DEFINE([ENABLE_H2O], [1], [H2O web server])
-        H2O_CFLAGS="-I\$(abs_top_srcdir)/web/server/h2o/libh2o/include -I\$(abs_top_srcdir)/web/server/h2o/libh2o/deps/picotls/include -I\$(abs_top_srcdir)/web/server/h2o/libh2o/deps/quicly/include -DH2O_USE_LIBUV=0"
+        H2O_CFLAGS="-Wno-unused-result -Wno-misleading-indentation -Wno-format-security -Wno-format -Wno-unused-function -Wno-unused-parameter -Wno-type-limits -Wno-unused-but-set-variable -Wno-implicit-fallthrough -I\$(abs_top_srcdir)/web/server/h2o/libh2o/include -I\$(abs_top_srcdir)/web/server/h2o/libh2o/deps/picotls/include -I\$(abs_top_srcdir)/web/server/h2o/libh2o/deps/quicly/include -DH2O_USE_LIBUV=0"
     fi
 fi
 AM_CONDITIONAL([ENABLE_H2O], [test "${can_build_h2o}" = "yes"])