Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb329493

Browse files
committed
[PBCKP-216] remove warning: ISO C90 forbids mixed declarations and code + codestyle fixes
1 parent2aee16c commitb329493

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

‎src/show.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* show.c: show backup information.
44
*
55
* Portions Copyright (c) 2009-2011, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
6-
* Portions Copyright (c) 2015-2019, Postgres Professional
6+
* Portions Copyright (c) 2015-2022, Postgres Professional
77
*
88
*-------------------------------------------------------------------------
99
*/
@@ -1015,6 +1015,12 @@ show_archive_json(const char *instance_name, uint32 xlog_seg_size,
10151015
timelineInfo*tlinfo= (timelineInfo*)parray_get(actual_tli_list,i);
10161016
chartmp_buf[MAXFNAMELEN];
10171017
floatzratio=0;
1018+
locale_tsaveloc;
1019+
#ifdefHAVE_USELOCALE
1020+
locale_tnewloc;
1021+
#elifHAVE__CONFIGTHREADLOCALE
1022+
locale_toldthreadlocale;
1023+
#endif
10181024

10191025
if (i!= (parray_num(actual_tli_list)-1))
10201026
appendPQExpBufferChar(buf,',');
@@ -1047,25 +1053,24 @@ show_archive_json(const char *instance_name, uint32 xlog_seg_size,
10471053

10481054
json_add_key(buf,"zratio",json_level);
10491055

1050-
// forcing comma-based floating point representation
1051-
locale_tsaveloc;
1056+
/* forcing comma-based floating point representation */
10521057
#ifdefHAVE_USELOCALE
1053-
locale_tnewloc=newlocale(LC_NUMERIC_MASK,"C", (locale_t)0);
1058+
newloc=newlocale(LC_NUMERIC_MASK,"C", (locale_t)0);
10541059
saveloc=uselocale(newloc);
10551060
#else
10561061
#ifdefHAVE__CONFIGTHREADLOCALE
1057-
locale_toldthreadlocale=_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
1062+
oldthreadlocale=_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
10581063
#endif
10591064
saveloc=setlocale(LC_NUMERIC,NULL);
10601065
setlocale(LC_NUMERIC,"C");
10611066
#endif
10621067
if (tlinfo->size!=0)
1063-
zratio= ((float)xlog_seg_size*tlinfo->n_xlog_files) /tlinfo->size;
1068+
zratio= ((float)xlog_seg_size*tlinfo->n_xlog_files) /tlinfo->size;
10641069
appendPQExpBuffer(buf,"%.2f",zratio);
10651070

1066-
// restoring previous locale
1071+
/* restoring previous locale */
10671072
#ifdefHAVE_USELOCALE
1068-
if(saveloc!= (locale_t)0)
1073+
if(saveloc!= (locale_t)0)
10691074
uselocale(saveloc);
10701075
freelocale(newloc);
10711076
#else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp