Content-Length: 272753 | pFad | http://github.com/postgrespro/postgres/commit/37c6923cf3d8ec1bd44924aab6f58f72754a0e7b

D3 Fix -Wmissing-variable-declarations warnings for float.c special case · postgrespro/postgres@37c6923 · GitHub
Skip to content

Commit 37c6923

Browse files
committed
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
1 parent ab61c40 commit 37c6923

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/backend/utils/adt/float.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,15 @@ static float8 cot_45 = 0;
5555
* be referenced by other files, much less changed; but we don't want the
5656
* compiler to know that, else it might try to precompute expressions
5757
* involving them. See comments for init_degree_constants().
58-
*/
58+
*
59+
* The additional extern declarations are to silence
60+
* -Wmissing-variable-declarations.
61+
*/
62+
extern float8 degree_c_thirty;
63+
extern float8 degree_c_forty_five;
64+
extern float8 degree_c_sixty;
65+
extern float8 degree_c_one_half;
66+
extern float8 degree_c_one;
5967
float8 degree_c_thirty = 30.0;
6068
float8 degree_c_forty_five = 45.0;
6169
float8 degree_c_sixty = 60.0;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/37c6923cf3d8ec1bd44924aab6f58f72754a0e7b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy