Re: Remove unnecessary static specifier - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove unnecessary static specifier
Date
Msg-id 815395.1738771515@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove unnecessary static specifier  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Remove unnecessary static specifier
List pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> 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 assigned to before any
other reference, so they cannot carry data across calls of the
function.

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.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Failed assertion with jit enabled
Next
From: Nathan Bossart
Date:
Subject: Re: [PATCH] SVE popcount support