From: Jeff Davis Date: Wed, 23 Oct 2024 17:24:17 +0000 (-0700) Subject: Fix compiler warning. X-Git-Url: http://git.postgresql.org/gitweb/static/main.js?a=commitdiff_plain;h=56b1e88c804b0c7e32f77b4e2bd3cc42ebdfcc3f;p=users%2Fc2main%2Fpostgres.git Fix compiler warning. Some buildfarm members complained about an always-true test in the SOFT_ERROR_OCCURRED macro. Fix by reading the field directly rather than using the macro. Reported-by: Tom Lane Discussion: https://postgr.es/m/2144895.1729653514@sss.pgh.pa.us --- diff --git a/src/backend/statistics/attribute_stats.c b/src/backend/statistics/attribute_stats.c index c920409680..086dceaeaf 100644 --- a/src/backend/statistics/attribute_stats.c +++ b/src/backend/statistics/attribute_stats.c @@ -633,7 +633,7 @@ text_to_stavalues(const char *staname, FmgrInfo *array_in, Datum d, Oid typid, pfree(s); - if (SOFT_ERROR_OCCURRED(&escontext)) + if (escontext.error_occurred) { if (elevel != ERROR) escontext.error_data->elevel = elevel;