diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2024-07-24 06:21:40 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2024-07-25 10:40:04 +0200 |
commit | 37c6923cf3d8ec1bd44924aab6f58f72754a0e7b (patch) | |
tree | 24050fbad7c57db7a295402aa9d61418a307ca33 /src/backend/utils/adt/float.c | |
parent | ab61c40bfa2ba1887fee304b2ef5306a14a7248c (diff) | |
download | postgresql-37c6923cf3d8ec1bd44924aab6f58f72754a0e7b.tar.gz postgresql-37c6923cf3d8ec1bd44924aab6f58f72754a0e7b.zip |
Fix -Wmissing-variable-declarations warnings for float.c special case
This adds extern declarations for the global variables defined in
float.c but not meant for external use. This is a workaround to be
able to add -Wmissing-variable-declarations to the global set of
warning options in the near future.
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org
Diffstat (limited to 'src/backend/utils/adt/float.c')
-rw-r--r-- | src/backend/utils/adt/float.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index cbbb8aecafc..f709c21e1fe 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -55,7 +55,15 @@ static float8 cot_45 = 0; * be referenced by other files, much less changed; but we don't want the * compiler to know that, else it might try to precompute expressions * involving them. See comments for init_degree_constants(). - */ + * + * The additional extern declarations are to silence + * -Wmissing-variable-declarations. + */ +extern float8 degree_c_thirty; +extern float8 degree_c_forty_five; +extern float8 degree_c_sixty; +extern float8 degree_c_one_half; +extern float8 degree_c_one; float8 degree_c_thirty = 30.0; float8 degree_c_forty_five = 45.0; float8 degree_c_sixty = 60.0; |