From 78aae2983091c30e4ddc801c507c17a77b6b1b58 Mon Sep 17 00:00:00 2001 From: Álvaro Herrera Date: Wed, 12 Nov 2025 12:35:14 +0100 Subject: Change coding pattern for CURL_IGNORE_DEPRECATION() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of having to write a semicolon inside the macro argument, we can insert a semicolon with another macro layer. This no longer gives pg_bsd_indent indigestion, so we can remove the digestive aids that had to be installed in the pgindent Perl script. Author: Álvaro Herrera Reviewed-by: Andrew Dunstan Reviewed-by: Daniel Gustafsson Reviewed-by: Tom Lane Discussion: https://postgr.es/m/202511111134.njrwf5w5nbjm@alvherre.pgsql Backpatch-through: 18 --- src/interfaces/libpq-oauth/oauth-curl.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/interfaces/libpq-oauth/oauth-curl.c') diff --git a/src/interfaces/libpq-oauth/oauth-curl.c b/src/interfaces/libpq-oauth/oauth-curl.c index aa50b00d053..08e300715da 100644 --- a/src/interfaces/libpq-oauth/oauth-curl.c +++ b/src/interfaces/libpq-oauth/oauth-curl.c @@ -1919,6 +1919,12 @@ start_request(struct async_ctx *actx) #define CURL_IGNORE_DEPRECATION(x) x #endif +/* + * Add another macro layer that inserts the needed semicolon, to avoid having + * to write a literal semicolon in the call below, which would break pgindent. + */ +#define PG_CURL_IGNORE_DEPRECATION(x) CURL_IGNORE_DEPRECATION(x;) + /* * Drives the multi handle towards completion. The caller should have already * set up an asynchronous request via start_request(). @@ -1948,11 +1954,10 @@ drive_request(struct async_ctx *actx) * to remove or break this API, so ignore the deprecation. See * * https://curl.se/mail/lib-2024-11/0028.html - * */ - CURL_IGNORE_DEPRECATION( - err = curl_multi_socket_all(actx->curlm, &actx->running); - ) + PG_CURL_IGNORE_DEPRECATION(err = + curl_multi_socket_all(actx->curlm, + &actx->running)); if (err) { -- cgit v1.2.3