diff --git a/configure.ac b/configure.ac index 77ee01ccf38..6900cfadeb6 100644 --- a/configure.ac +++ b/configure.ac @@ -863,7 +863,7 @@ case $host_os_def in AS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [ # This is useful for finding odd conversions # common_opt="-pipe -Wall -Wconversion -Wno-sign-conversion -Wno-format-truncation" - common_opt="-pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow" + common_opt="-pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -Wno-deprecated-declarations" debug_opt="-ggdb3 $common_opt" release_opt="-g $common_opt $optimizing_flags -feliminate-unused-debug-symbols -fno-strict-aliasing" cxx_opt="-Wno-invalid-offsetof -Wno-noexcept-type" diff --git a/proxy/http/remap/NextHopHealthStatus.cc b/proxy/http/remap/NextHopHealthStatus.cc index afb43c7222c..2412171b52d 100644 --- a/proxy/http/remap/NextHopHealthStatus.cc +++ b/proxy/http/remap/NextHopHealthStatus.cc @@ -119,22 +119,21 @@ NextHopHealthStatus::markNextHop(TSHttpTxn txn, const char *hostname, const int new_fail_count = h->failCount = 1; } } else if (result.retry == true) { - h->failedAt = _now; + h->failedAt = _now; + new_fail_count = h->failCount = 1; } } // end lock guard NH_Note("[%" PRId64 "] NextHop %s marked as down %s", sm_id, (result.retry) ? "retry" : "initially", h->hostname.c_str()); } else { - int old_count = 0; // if the last failure was outside the retry window, set the failcount to 1 and failedAt to now. { // lock guard std::lock_guard lock(h->_mutex); if ((h->failedAt + retry_time) < static_cast(_now)) { - h->failCount = 1; - h->failedAt = _now; + new_fail_count = h->failCount = 1; + h->failedAt = _now; } else { - old_count = h->failCount = 1; + new_fail_count = h->failCount += 1; } - new_fail_count = old_count + 1; } // end of lock_guard NH_Debug(NH_DEBUG_TAG, "[%" PRId64 "] Parent fail count increased to %d for %s", sm_id, new_fail_count, h->hostname.c_str()); } diff --git a/proxy/logging/LogFilter.h b/proxy/logging/LogFilter.h index 083dc08e6f0..749c044e5ac 100644 --- a/proxy/logging/LogFilter.h +++ b/proxy/logging/LogFilter.h @@ -474,7 +474,7 @@ wipeField(char **field, char *pattern, const char *uppercase_field) // search new param again const char *new_param = strchr(lookup_query_param + field_pos, '&'); - if (new_param && (new_param + 1)) { + if (new_param && *(new_param + 1)) { pattern_in_param_name = findPatternFromParamName(new_param + 1, pattern); } else { break;