From: Amos Jeffries Date: Thu, 15 Sep 2022 01:14:17 +0000 (+0000) Subject: Fix 'warning: stray \ before -' (#1141) X-Git-Tag: SQUID_6_0_1~108 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6b1d7a0e7870dbffaf1c0ea3822f944ea4b5109b;p=thirdparty%2Fsquid.git Fix 'warning: stray \ before -' (#1141) grep 3.8 started detecting overly-escaped regex patterns --- diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 index 46a0bee8be..462383e051 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 @@ -192,7 +192,7 @@ main(void) return 0; } ]])], [ squid_cv_working_gssapi=yes ], [ squid_cv_working_gssapi=no ], [:])]) - AS_IF([test "x$squid_cv_working_gssapi" = "xno" -a `echo $LIBS | grep -i -c "\-L"` -gt 0],[ + AS_IF([test "x$squid_cv_working_gssapi" = "xno" -a `echo $LIBS | grep -i -c "[-]L"` -gt 0],[ AC_MSG_NOTICE([Check Runtime library path !]) ]) ]) @@ -284,7 +284,7 @@ main(void) return 0; } ]])], [ squid_cv_working_krb5=yes ], [ squid_cv_working_krb5=no ],[:])]) - AS_IF([test "x$squid_cv_working_krb5" = "xno" -a `echo $LIBS | grep -i -c "\-L"` -gt 0],[ + AS_IF([test "x$squid_cv_working_krb5" = "xno" -a `echo $LIBS | grep -i -c "[-]L"` -gt 0],[ AC_MSG_NOTICE([Check Runtime library path !]) ]) ]) diff --git a/configure.ac b/configure.ac index 65572f655d..75b4a51a37 100644 --- a/configure.ac +++ b/configure.ac @@ -91,7 +91,7 @@ AS_IF([test "x$BUILDCXX" = "x"],[ AC_SUBST(BUILDCXX) # If the user did not specify a C++ version. -user_cxx=`echo "$PRESET_CXXFLAGS" | grep -o -E "\-std="` +user_cxx=`echo "$PRESET_CXXFLAGS" | grep -o -E "[-]std="` AS_IF([test "x$user_cxx" = "x"],[ # Check for C++11 compiler support AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) diff --git a/errors/Makefile.am b/errors/Makefile.am index 19a48e2fb6..a6644e4e01 100644 --- a/errors/Makefile.am +++ b/errors/Makefile.am @@ -53,7 +53,7 @@ translate-warn: $(TRANSLATE_LANGUAGES): $(ERROR_TEMPLATES) -NOTIDY=`$(PO2HTML) --help | grep -o "\-\-notidy"` +NOTIDY=`$(PO2HTML) --help | grep -o "[-]-notidy"` .po.lang: if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no" && test "$(PO2HTML)" != "off" && test -f $(top_srcdir)/errors/en.po; then \ diff --git a/test-suite/buildtests/layer-01-minimal.opts b/test-suite/buildtests/layer-01-minimal.opts index 54e3e83126..c12b5a28e2 100644 --- a/test-suite/buildtests/layer-01-minimal.opts +++ b/test-suite/buildtests/layer-01-minimal.opts @@ -17,10 +17,10 @@ MAKETEST="distcheck" # # # The options for this level can be easily generated semi-automatically from configure.ac by: -# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >disable.opts +# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z-]+[,]" | grep -o -E "[^,]+" >disable.opts # followed by insertion of ' --disable-' and '\' strings # -# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >without.opts +# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z-]+[,]" | grep -o -E "[^,]+" >without.opts # followed by insertion of ' --without-' and ' \' strings # # sometimes it's just too automatic.. Following options should be just stripped diff --git a/test-suite/buildtests/layer-02-maximus.opts b/test-suite/buildtests/layer-02-maximus.opts index 0d9b9df420..55789faf98 100644 --- a/test-suite/buildtests/layer-02-maximus.opts +++ b/test-suite/buildtests/layer-02-maximus.opts @@ -17,10 +17,10 @@ MAKETEST="distcheck" # # # The options for this level can be easily generated semi-automatically from configure.ac by: -# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >disable.opts +# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z-]+[,]" | grep -o -E "[^,]+" >disable.opts # followed by insertion of ' --enable-' and '\' strings # -# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >without.opts +# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z-]+[,]" | grep -o -E "[^,]+" >without.opts # followed by insertion of ' --with-' and ' \' strings # # sometimes it's just too automatic.. diff --git a/test-suite/buildtests/layer-04-noauth-everything.opts b/test-suite/buildtests/layer-04-noauth-everything.opts index 685ea7f4fc..0e9d5446e1 100644 --- a/test-suite/buildtests/layer-04-noauth-everything.opts +++ b/test-suite/buildtests/layer-04-noauth-everything.opts @@ -17,10 +17,10 @@ MAKETEST="distcheck" # # # The options for this level can be easily generated semi-automatically from configure.ac by: -# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >disable.opts +# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z-]+[,]" | grep -o -E "[^,]+" >disable.opts # followed by insertion of ' --enable-' and '\' strings # -# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >without.opts +# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z-]+[,]" | grep -o -E "[^,]+" >without.opts # followed by insertion of ' --with-' and ' \' strings # # sometimes it's just too automatic..