Re: ICU for global collation - Mailing list pgsql-hackers

From Andres Freund
Subject Re: ICU for global collation
Date
Msg-id 20220319014707.kgtomqdzm6m2ulro@alap3.anarazel.de
Whole thread Raw
In response to Re: ICU for global collation  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
Hi,

On 2022-03-17 14:14:52 +0100, Peter Eisentraut wrote:
> committed, thanks

Just noticed that this adds a new warning when building with -O3:

In file included from /home/andres/src/postgresql/src/include/catalog/pg_collation.h:22,
                 from /home/andres/src/postgresql/src/backend/commands/dbcommands.c:39:
In function ‘collprovider_name’,
    inlined from ‘createdb’ at /home/andres/src/postgresql/src/backend/commands/dbcommands.c:514:4:
../../../src/include/catalog/pg_collation_d.h:47:9: warning: ‘src_locprovider’ may be used uninitialized
[-Wmaybe-uninitialized]
   47 |         switch (c)
      |         ^~~~~~
/home/andres/src/postgresql/src/backend/commands/dbcommands.c: In function ‘createdb’:
/home/andres/src/postgresql/src/backend/commands/dbcommands.c:112:25: note: ‘src_locprovider’ was declared here
  112 |         char            src_locprovider;
      |                         ^~~~~~~~~~~~~~~

I'd fixed that for nearby variables in 3f6b3be39ca9... Gonna just NULL
initialize it as well.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [PATCH] Add reloption for views to enable RLS
Next
From: Noah Misch
Date:
Subject: Re: Replication slot drop message is sent after pgstats shutdown.