Re: Remove unnecessary static specifier

2025-02-06 Thread Daniel Gustafsson
> On 6 Feb 2025, at 02:51, Japin Li wrote: > > On Wed, 05 Feb 2025 at 18:17, Daniel Gustafsson wrote: >>> On 5 Feb 2025, at 17:05, Tom Lane wrote: >> >>> While we're at it, could we make the adjacent "magic" string be >>> "static const char *magic"? (Probably needs a couple more >>> "const" m

Re: Remove unnecessary static specifier

2025-02-05 Thread Japin Li
On Wed, 05 Feb 2025 at 18:17, Daniel Gustafsson wrote: >> On 5 Feb 2025, at 17:05, Tom Lane wrote: > >> While we're at it, could we make the adjacent "magic" string be >> "static const char *magic"? (Probably needs a couple more >> "const" modifiers at use sites, too.) > > Good point, from the l

Re: Remove unnecessary static specifier

2025-02-05 Thread Daniel Gustafsson
> On 5 Feb 2025, at 17:05, Tom Lane wrote: > While we're at it, could we make the adjacent "magic" string be > "static const char *magic"? (Probably needs a couple more > "const" modifiers at use sites, too.) Good point, from the link referenced it's clear that FreeBSD has made that change as w

Re: Remove unnecessary static specifier

2025-02-05 Thread Tom Lane
Daniel Gustafsson writes: > From a quick first inspection (and running the tests with the patch applied) I > agree with this, these variables do not need to be static. I'll stare a bit > more at this to make sure but seems like the right patch. +1. All three of those variables are visibly assig

Re: Remove unnecessary static specifier

2025-02-05 Thread Daniel Gustafsson
> On 5 Feb 2025, at 13:30, Japin Li wrote: > When reviewing patch [1], I find that the static class specifier is > unnecessary > for the variables sp and ep in the function px_crypt_md5(). From a quick first inspection (and running the tests with the patch applied) I agree with this, these vari

Remove unnecessary static specifier

2025-02-05 Thread Japin Li
Hi, When reviewing patch [1], I find that the static class specifier is unnecessary for the variables sp and ep in the function px_crypt_md5(). diff --git a/contrib/pgcrypto/crypt-md5.c b/contrib/pgcrypto/crypt-md5.c index d38721a1010..3d17b2340fe 100644 --- a/contrib/pgcrypto/crypt-md5.c +++ b/