Skip to content

Commit 15a3816

Browse files
authored
Merge pull request #260 from postgrespro/PGPRO-7417
[PGPRO-7417] Added 'volatile' modifier for local variables
2 parents 3fae863 + 8744125 commit 15a3816

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/include/init.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ void *pathman_cache_search_relid(HTAB *cache_table,
171171
/*
172172
* Save and restore PathmanInitState.
173173
*/
174-
void save_pathman_init_state(PathmanInitState *temp_init_state);
175-
void restore_pathman_init_state(const PathmanInitState *temp_init_state);
174+
void save_pathman_init_state(volatile PathmanInitState *temp_init_state);
175+
void restore_pathman_init_state(const volatile PathmanInitState *temp_init_state);
176176

177177
/*
178178
* Create main GUC variables.

src/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ pathman_cache_search_relid(HTAB *cache_table,
134134
*/
135135

136136
void
137-
save_pathman_init_state(PathmanInitState *temp_init_state)
137+
save_pathman_init_state(volatile PathmanInitState *temp_init_state)
138138
{
139139
*temp_init_state = pathman_init_state;
140140
}
141141

142142
void
143-
restore_pathman_init_state(const PathmanInitState *temp_init_state)
143+
restore_pathman_init_state(const volatile PathmanInitState *temp_init_state)
144144
{
145145
/*
146146
* initialization_needed is not restored: it is not just a setting but

src/pl_funcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ add_to_pathman_config(PG_FUNCTION_ARGS)
796796

797797
Oid expr_type;
798798

799-
PathmanInitState init_state;
799+
volatile PathmanInitState init_state;
800800

801801
if (!IsPathmanReady())
802802
elog(ERROR, "pg_pathman is disabled");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy