pgsql: Fix compiler warning for commit 434dbf69.

2025-03-18 Thread Thomas Munro
Fix compiler warning for commit 434dbf69. Reported-by: Tom Lane Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0b53c08677a6515786bde9d4471b42ef7289759e Modified Files -- src/interfaces/libpq/fe-auth-oauth-curl.c | 2 +- 1 file changed, 1 insertion(+),

pgsql: Fix compiler warning in pg_logicalinspect.

2025-03-12 Thread Masahiko Sawada
Fix compiler warning in pg_logicalinspect. Oversight in bd65cb3cd48. Reported-by: David Rowley Reported-by: Nathan Bossart Author: David Rowley Discussion: https://postgr.es/m/CAApHDvqrhFfnetbcwgGkJ=z63T8HfQ_OyP=vx8byixyxfkt...@mail.gmail.com Branch -- master Details --- https://git

pgsql: Fix compiler warning.

2024-10-23 Thread Jeff Davis
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.1729653...@sss.pgh.pa.us Branch -- master Details

pgsql: Fix compiler warning in mul_var_short().

2024-08-26 Thread Dean Rasheed
Fix compiler warning in mul_var_short(). Some compilers (e.g., gcc before version 7) mistakenly think "carry" might be used uninitialized. Reported by Tom Lane, per various buildfarm members, e.g. arowana. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7cac6307a43

pgsql: Fix compiler warning/error about typedef redefinitions

2024-07-29 Thread Heikki Linnakangas
Fix compiler warning/error about typedef redefinitions Per buildfarm member 'sifaka': procsignal.c:87:3: error: redefinition of typedef 'ProcSignalHeader' is a C11 feature [-Werror,-Wtypedef-redefinition] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8bda213

pgsql: Fix compiler warning for pg_lfind32().

2024-03-26 Thread Nathan Bossart
Fix compiler warning for pg_lfind32(). The newly-introduced "one_by_one" label produces -Wunused-label warnings when building without SIMD support. To fix, move the label into the SIMD section of this function. Oversight in commit 7644a7340c. Reported-by: Tom Lane Discussion: https://postgr.es/

pgsql: Fix compiler warning on typedef redeclaration

2024-02-23 Thread Heikki Linnakangas
Fix compiler warning on typedef redeclaration bulk_write.c:78:3: error: redefinition of typedef 'BulkWriteState' is a C11 feature [-Werror,-Wtypedef-redefinition] } BulkWriteState; ^ ../../../../src/include/storage/bulk_write.h:20:31: note: previous definition is here typed

pgsql: Fix compiler warning on MSVC

2022-11-07 Thread David Rowley
Fix compiler warning on MSVC MSVC does not understand that ereport(ERROR) does not return, so just return the first enum PartitionStrategy value to keep the compiler from complaining about the missing return. Discussion: https://postgr.es/m/20221104161934.gb16...@telsasoft.com Branch -- mast

pgsql: Fix compiler warning introduced in commit 705e20f855.

2022-03-14 Thread Amit Kapila
Fix compiler warning introduced in commit 705e20f855. Reported-by: Nathan Bossart Author: Nathan Bossart Reviewed-by: Osumi Takamichi Discussion : https://postgr.es/m/20220314230424.GA1085716@nathanxps13 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/695f459f171330

pgsql: Fix compiler warning in non-assert builds, introduced in f862d57

2022-02-03 Thread Andres Freund
Fix compiler warning in non-assert builds, introduced in f862d57057f. Discussion: https://postgr.es/m/20220203183655.ralgkh54sdcgy...@alap3.anarazel.de Backpatch: 14-, like f862d57057f Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2a3958e4d9b9b1e82adefa11f

pgsql: Fix compiler warning in non-assert builds, introduced in f862d57

2022-02-03 Thread Andres Freund
Fix compiler warning in non-assert builds, introduced in f862d57057f. Discussion: https://postgr.es/m/20220203183655.ralgkh54sdcgy...@alap3.anarazel.de Backpatch: 14-, like f862d57057f Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7c1aead6cbe7dcc6c216715fed7a1fb6

pgsql: Fix compiler warning

2021-12-12 Thread Tom Lane
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. This back-patches commit 333a186dc into out-of-support branches, p

pgsql: Fix compiler warning

2021-12-12 Thread Tom Lane
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. This back-patches commit 333a186dc into out-of-support branches, p

pgsql: Fix compiler warning

2021-06-07 Thread Alvaro Herrera
Fix compiler warning Introduced by 41306a511c01dd299115cf447858a00e34aebbf6, happens with gcc 4.7.2. Forward-port of 1ec36a9eb4c2, which was applied to 9.6 only. Author: Peter Eisentraut Reported-by: Anton Voloshin Discussion: https://postgr.es/m/be8bbcdf-35f8-a8a6-098f-65c2e9497...@postgresp

pgsql: Fix compiler warning for MSVC in libpq_pipeline.c

2021-04-06 Thread David Rowley
Fix compiler warning for MSVC in libpq_pipeline.c DEBUG was already defined by the MSVC toolchain for "Debug" builds. On these systems the unconditional #define DEBUG was causing a 'DEBUG': macro redefinition warning. Here we rename DEBUG to DEBUG_OUPUT and also get rid of the #define which defin

pgsql: Fix compiler warning in fe-trace.c for MSVC

2021-04-05 Thread David Rowley
Fix compiler warning in fe-trace.c for MSVC It seems that in MSVC timeval's tv_sec field is of type long. localtime() takes a time_t pointer. Since long is 32-bit even on 64-bit builds in MSVC, passing a long pointer instead of the correct time_t pointer generated a compiler warning. Fix that.

pgsql: Fix compiler warning in unistr function

2021-03-30 Thread David Rowley
Fix compiler warning in unistr function Some compilers are not aware that elog/ereport ERROR does not return. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/efd9d92bb39c74c2aded64fc08e2d601ce20c39d Modified Files -- src/backend/utils/adt/varlena.c | 1

pgsql: Fix compiler warning in back branches (9.6, 10).

2021-02-15 Thread Thomas Munro
Fix compiler warning in back branches (9.6, 10). Back-patch a tiny bit of commit fbb2e9a0 into 9.6 and 10, to silence an uninitialized variable warning from GCC 10.2. Seen on buildfarm member handfish, and my own development workflow where I like to use -Werror. Discussion: https://postgr.es/m/

pgsql: Fix compiler warning in back branches (9.6, 10).

2021-02-15 Thread Thomas Munro
Fix compiler warning in back branches (9.6, 10). Back-patch a tiny bit of commit fbb2e9a0 into 9.6 and 10, to silence an uninitialized variable warning from GCC 10.2. Seen on buildfarm member handfish, and my own development workflow where I like to use -Werror. Discussion: https://postgr.es/m/

pgsql: Fix compiler warning in multirange_constructor0()

2020-12-21 Thread Alexander Korotkov
Fix compiler warning in multirange_constructor0() Discussion: https://postgr.es/m/X%2BBP8XE0UpIB6Yvh%40paquier.xyz Author: Michael Paquier Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/29f8f546767ebb4253f6dc37815e2d95fff9acd0 Modified Files -- src/bac

pgsql: Fix compiler warning introduced in 6df7a9698b

2020-12-20 Thread Alexander Korotkov
Fix compiler warning introduced in 6df7a9698b Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/11072e86939d2f5ca0a97c709b46f29ea8b57590 Modified Files -- src/backend/commands/typecmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix compiler warning

2020-09-14 Thread David Rowley
Fix compiler warning Introduced in 0aa8f7640. MSVC warned about performing 32-bit bit shifting when it appeared like we might like a 64-bit result. We did, but it just so happened that none of the calls to this function could have caused the 32-bit shift to overflow. Here we just cast the const

pgsql: Fix compiler warning from Clang.

2020-07-31 Thread Thomas Munro
Fix compiler warning from Clang. Per build farm. Discussion: https://postgr.es/m/20200731062626.GD3317%40paquier.xyz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7be04496a9f763fc4d4c1d06ce9ccc250e52df31 Modified Files -- src/backend/utils/misc/guc.c

pgsql: Fix compiler warning induced by commit d8b15eeb8.

2020-06-24 Thread Tom Lane
Fix compiler warning induced by commit d8b15eeb8. I forgot that INT64_FORMAT can't be used with sscanf on Windows. Use the same trick of sscanf'ing into a temp variable as we do in some other places in zic.c. The upstream IANA code avoids the portability problem by relying on 's SCNdFAST64 macro.

pgsql: Fix compiler warning induced by commit d8b15eeb8.

2020-06-24 Thread Tom Lane
Fix compiler warning induced by commit d8b15eeb8. I forgot that INT64_FORMAT can't be used with sscanf on Windows. Use the same trick of sscanf'ing into a temp variable as we do in some other places in zic.c. The upstream IANA code avoids the portability problem by relying on 's SCNdFAST64 macro.

pgsql: Fix compiler warning induced by commit d8b15eeb8.

2020-06-24 Thread Tom Lane
Fix compiler warning induced by commit d8b15eeb8. I forgot that INT64_FORMAT can't be used with sscanf on Windows. Use the same trick of sscanf'ing into a temp variable as we do in some other places in zic.c. The upstream IANA code avoids the portability problem by relying on 's SCNdFAST64 macro.

pgsql: Fix compiler warning induced by commit d8b15eeb8.

2020-06-24 Thread Tom Lane
Fix compiler warning induced by commit d8b15eeb8. I forgot that INT64_FORMAT can't be used with sscanf on Windows. Use the same trick of sscanf'ing into a temp variable as we do in some other places in zic.c. The upstream IANA code avoids the portability problem by relying on 's SCNdFAST64 macro.

pgsql: Fix compiler warning induced by commit d8b15eeb8.

2020-06-24 Thread Tom Lane
Fix compiler warning induced by commit d8b15eeb8. I forgot that INT64_FORMAT can't be used with sscanf on Windows. Use the same trick of sscanf'ing into a temp variable as we do in some other places in zic.c. The upstream IANA code avoids the portability problem by relying on 's SCNdFAST64 macro.

pgsql: Fix compiler warning induced by commit d8b15eeb8.

2020-06-24 Thread Tom Lane
Fix compiler warning induced by commit d8b15eeb8. I forgot that INT64_FORMAT can't be used with sscanf on Windows. Use the same trick of sscanf'ing into a temp variable as we do in some other places in zic.c. The upstream IANA code avoids the portability problem by relying on 's SCNdFAST64 macro.

pgsql: Fix compiler warning induced by commit d8b15eeb8.

2020-06-24 Thread Tom Lane
Fix compiler warning induced by commit d8b15eeb8. I forgot that INT64_FORMAT can't be used with sscanf on Windows. Use the same trick of sscanf'ing into a temp variable as we do in some other places in zic.c. The upstream IANA code avoids the portability problem by relying on 's SCNdFAST64 macro.

pgsql: Fix compiler warning on Cygwin

2020-03-24 Thread Peter Eisentraut
Fix compiler warning on Cygwin bf68b79e50e3359accc85c94fa23cc03abb9350a introduced an unused variable compiler warning on Cygwin. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f15ace793578d96d70dad1e613293ae3eab92503 Modified Files -- src/backend/util

pgsql: Fix compiler warning

2020-03-24 Thread Peter Eisentraut
Fix compiler warning A variable was unused in non-assert builds. Simplify the code to avoid the issue. Reported-by: Erik Rijkers Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cef27ae01ac872355b2bd56c0882aafe5c6f08de Modified Files -- src/backend/re

pgsql: Fix compiler warning about format on Windows

2020-01-14 Thread Peter Eisentraut
Fix compiler warning about format on Windows On 64-bit Windows, pid_t is long long int, so a %d format isn't enough. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fe233366f2e3ca44609c805ce0604c1e2122c3f9 Modified Files -- src/backend/replication/walre

Re: pgsql: Fix compiler warning for ppoll() on Cygwin

2019-12-26 Thread Andrew Dunstan
On Fri, Dec 27, 2019 at 10:24 AM Tom Lane wrote: > > Andrew Dunstan writes: > > On Thu, Dec 26, 2019 at 4:12 PM Tom Lane wrote: > >> Next question is why the buildfarm client got that wrong. Seems like > >> its accache logic needs to notice changes in src/template/* as well as > >> the configur

Re: pgsql: Fix compiler warning for ppoll() on Cygwin

2019-12-26 Thread Tom Lane
Andrew Dunstan writes: > On Thu, Dec 26, 2019 at 4:12 PM Tom Lane wrote: >> Next question is why the buildfarm client got that wrong. Seems like >> its accache logic needs to notice changes in src/template/* as well as >> the configure script proper. > The problem with that is that a change in

Re: pgsql: Fix compiler warning for ppoll() on Cygwin

2019-12-26 Thread Andrew Dunstan
On Thu, Dec 26, 2019 at 4:12 PM Tom Lane wrote: > Peter Eisentraut writes: > > I think the config.cache of lorikeet needs to be cleaned, because the > > return type of strerror_r() has changed as a result of this commit, but > > the build farm logs still show the old test result being used from

Re: pgsql: Fix compiler warning for ppoll() on Cygwin

2019-12-25 Thread Tom Lane
Peter Eisentraut writes: > I think the config.cache of lorikeet needs to be cleaned, because the > return type of strerror_r() has changed as a result of this commit, but > the build farm logs still show the old test result being used from the > cache. lorikeet's latest build run appears to ha

Re: pgsql: Fix compiler warning for ppoll() on Cygwin

2019-12-25 Thread Andrew Dunstan
On Thu, Dec 26, 2019 at 7:28 AM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > I think the config.cache of lorikeet needs to be cleaned, because the > return type of strerror_r() has changed as a result of this commit, but > the build farm logs still show the old test result being u

Re: pgsql: Fix compiler warning for ppoll() on Cygwin

2019-12-25 Thread Peter Eisentraut
I think the config.cache of lorikeet needs to be cleaned, because the return type of strerror_r() has changed as a result of this commit, but the build farm logs still show the old test result being used from the cache. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL De

Re: pgsql: Fix compiler warning for ppoll() on Cygwin

2019-12-24 Thread Tom Lane
Peter Eisentraut writes: > Fix compiler warning for ppoll() on Cygwin > _GNU_SOURCE is required to get the prototype, so just define that > globally, as was already done in the linux template. This seems to have broken lorikeet: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lorikeet&dt

pgsql: Fix compiler warning for ppoll() on Cygwin

2019-12-22 Thread Peter Eisentraut
Fix compiler warning for ppoll() on Cygwin _GNU_SOURCE is required to get the prototype, so just define that globally, as was already done in the linux template. Discussion: https://www.postgresql.org/message-id/flat/6b467edc-4018-521f-ab18-171f098557ca%402ndquadrant.com Branch -- master D

pgsql: Fix compiler warning in non-assert builds

2019-12-18 Thread Michael Paquier
Fix compiler warning in non-assert builds Oversight in commit e1551f9. Reported-by: Erik Rijkers Discussion: https://postgr.es/m/b7ad911d3eaa29af9fcdb9ccb26c3...@xs4all.nl Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2032645b195a53519b43dad57f55bc163b99f0ef Mod

Re: pgsql: Fix compiler warning

2019-09-06 Thread Peter Eisentraut
On 2019-09-05 16:15, Tom Lane wrote: > Peter Eisentraut writes: >> The tree currently does not compile without warnings on Windows (for >> me), so it doesn't seem worth fixing warnings piece by piece in the >> backbranches. > > Hm, I see no warnings on e.g. dory. What are you seeing, and with >

Re: pgsql: Fix compiler warning

2019-09-05 Thread Tom Lane
Peter Eisentraut writes: > The tree currently does not compile without warnings on Windows (for > me), so it doesn't seem worth fixing warnings piece by piece in the > backbranches. Hm, I see no warnings on e.g. dory. What are you seeing, and with what toolchain? (Or should I be asking about bu

Re: pgsql: Fix compiler warning

2019-09-05 Thread Peter Eisentraut
On 2019-09-02 10:03, Michael Paquier wrote: > On Mon, Sep 02, 2019 at 07:54:16AM +0200, Peter Eisentraut wrote: >> Is this code new in PG12? Doesn't look like it to me. > > Well, 12 has not been released yet, which is the point I am trying to > make. The code was introduced in 10, and as the fix

Re: pgsql: Fix compiler warning

2019-09-02 Thread Michael Paquier
On Mon, Sep 02, 2019 at 07:54:16AM +0200, Peter Eisentraut wrote: > Is this code new in PG12? Doesn't look like it to me. Well, 12 has not been released yet, which is the point I am trying to make. The code was introduced in 10, and as the fix is trivial it seems to me that it could be back-patc

Re: pgsql: Fix compiler warning

2019-09-01 Thread Peter Eisentraut
On 2019-09-02 03:04, Michael Paquier wrote: > On Sun, Sep 01, 2019 at 09:22:03PM +, Peter Eisentraut wrote: >> Fix compiler warning >> >> Fix a warning about unused variable on Windows when using OpenSSL. > > Perhaps this could be back-patched to v12? Is this code new in PG12? Doesn't look l

Re: pgsql: Fix compiler warning

2019-09-01 Thread Michael Paquier
On Sun, Sep 01, 2019 at 09:22:03PM +, Peter Eisentraut wrote: > Fix compiler warning > > Fix a warning about unused variable on Windows when using OpenSSL. Perhaps this could be back-patched to v12? -- Michael signature.asc Description: PGP signature

pgsql: Fix compiler warning

2019-09-01 Thread Peter Eisentraut
Fix compiler warning Fix a warning about unused variable on Windows when using OpenSSL. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/36515e4f14fc1b22787a54d5de45b1e6b5e6cd9c Modified Files -- src/port/pg_strong_random.c | 4 ++-- 1 file changed, 2 ins

pgsql: Fix compiler warning

2019-08-12 Thread Peter Eisentraut
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. Branch -- REL9_6_STABLE Details --- https://git.postgresq

pgsql: Fix compiler warning

2019-08-12 Thread Peter Eisentraut
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. Branch -- REL9_4_STABLE Details --- https://git.postgresq

pgsql: Fix compiler warning

2019-08-12 Thread Peter Eisentraut
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. Branch -- REL_10_STABLE Details --- https://git.postgresq

pgsql: Fix compiler warning

2019-08-12 Thread Peter Eisentraut
Fix compiler warning With some newer gcc versions (8 and 9) you get a -Wformat-overflow warning here. In PG11 and later this was already fixed. Since it's trivial, backport it to get the older branches building without warnings. Branch -- REL9_5_STABLE Details --- https://git.postgresq

pgsql: Fix compiler warning

2019-04-05 Thread Peter Eisentraut
Fix compiler warning Rewrite get_attgenerated() to avoid compiler warning if the compiler does not recognize that elog(ERROR) does not return. Reported-by: David Rowley Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/edda32ee250fe480701083d4e072e06929991bf9 Modif

pgsql: Fix compiler warning in jsonpath_exec.c

2019-03-17 Thread Alexander Korotkov
Fix compiler warning in jsonpath_exec.c Warning was observed in gcc 4.4.6, gcc 4.4.7 and probably others. Reported-by: Tom Lane Discussion: https://postgr.es/m/25151.1552751426%40sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/042162d6281a7daf1291931e

pgsql: Fix compiler warning on Windows.

2018-05-01 Thread Tom Lane
Fix compiler warning on Windows. Commit 41c912cad caused MSVC to complain that not all control paths return a value. Thomas Munro Discussion: https://postgr.es/m/CAEepm%3D3%3DTDYEXUEcHpEx%2BTwc31wo7PA0oBAiNt6sWmq93MW02A%40mail.gmail.com Branch -- master Details --- https://git.postgre

pgsql: Fix compiler warning about format truncation

2018-04-06 Thread Peter Eisentraut
Fix compiler warning about format truncation Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2cd6520e78fe8bbb4ba38f6c7624c002aa8cc481 Modified Files -- src/bin/pg_verify_checksums/pg_verify_checksums.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deleti

pgsql: Fix compiler warning

2018-03-14 Thread Peter Eisentraut
Fix compiler warning Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8df5a1c868cc28f89ac6221cff8e2b5c952d0eb6 Modified Files -- src/pl/plpgsql/src/pl_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix compiler warning in rangetypes_spgist.c.

2017-11-18 Thread Tom Lane
Fix compiler warning in rangetypes_spgist.c. On gcc 7.2.0, comparing pointer to (Datum) 0 produces a warning. Treat it as a simple pointer to avoid that; this is more consistent with comparable code elsewhere, anyway. Tomas Vondra Discussion: https://postgr.es/m/99410021-61ef-9a9a-9bc8-f733ece6

pgsql: Fix compiler warning in rangetypes_spgist.c.

2017-11-18 Thread Tom Lane
Fix compiler warning in rangetypes_spgist.c. On gcc 7.2.0, comparing pointer to (Datum) 0 produces a warning. Treat it as a simple pointer to avoid that; this is more consistent with comparable code elsewhere, anyway. Tomas Vondra Discussion: https://postgr.es/m/99410021-61ef-9a9a-9bc8-f733ece6

pgsql: Fix compiler warning in rangetypes_spgist.c.

2017-11-18 Thread Tom Lane
Fix compiler warning in rangetypes_spgist.c. On gcc 7.2.0, comparing pointer to (Datum) 0 produces a warning. Treat it as a simple pointer to avoid that; this is more consistent with comparable code elsewhere, anyway. Tomas Vondra Discussion: https://postgr.es/m/99410021-61ef-9a9a-9bc8-f733ece6