--- config/m4/compiler.m4.orig	2021-06-24 07:28:54.839708130 +0200
+++ config/m4/compiler.m4	2021-06-24 07:31:32.540464829 +0200
@@ -225,6 +225,12 @@
                             $5])
 ])
 
+# Suppress variable set but never used warning
+ADD_COMPILER_FLAG_IF_SUPPORTED([--diag_suppress 550],
+                               [--diag_suppress 550],
+                               [AC_LANG_SOURCE([[int main(){return 0;}]])],
+                               [],
+                               [])
 
 #
 # ADD_COMPILER_FLAG_IF_SUPPORTED
@@ -477,6 +483,13 @@
                                 [AC_LANG_SOURCE([[int main(int argc, char **argv){return 0;}]])])
 
 
+# Use of a const variable in a constant expression is nonstandard in C
+ADD_COMPILER_FLAG_IF_SUPPORTED([--diag_suppress 1902],
+                               [--diag_suppress 1902],
+                               [AC_LANG_SOURCE([[int main(){return 0;}]])],
+                               [],
+                               [])
+
 #
 # Check if "-pedantic" flag is supported
 #
