Re: gcc 12.1.0 warning

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: gcc 12.1.0 warning
Дата
Msg-id ZpVZB9rH5tHllO75@nathan
обсуждение исходный текст
Ответ на Re: gcc 12.1.0 warning  (Andres Freund <andres@anarazel.de>)
Ответы Re: gcc 12.1.0 warning
Список pgsql-hackers
On Mon, Jul 15, 2024 at 09:41:55AM -0700, Andres Freund wrote:
> On 2024-05-10 12:13:21 +0300, Nazir Bilal Yavuz wrote:
>> The fix is attached. It cleanly applies from REL_15_STABLE to
>> REL_12_STABLE, fixes the warnings and the tests pass.
> 
> Thanks! I've applied it to all branches - while it's not required to avoid a
> warning in newer versions, it's still not correct as it was...

nitpick: pgindent thinks one of the spaces is unnecessary.

diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index a043d529ef..b0947a4cf1 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1289,8 +1289,8 @@ find_option(const char *name, bool create_placeholders, bool skip_errors,
 static int
 guc_var_compare(const void *a, const void *b)
 {
-    const char *namea = **(const char ** const *) a;
-    const char *nameb = **(const char ** const *) b;
+    const char *namea = **(const char **const *) a;
+    const char *nameb = **(const char **const *) b;

     return guc_name_compare(namea, nameb);
 }

-- 
nathan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Upgrade Debian CI images to Bookworm
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Restart pg_usleep when interrupted