Commit d07936aa authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-19740: Silence a bogus "may be uninitialized" warning

parent ec28f953
...@@ -1590,10 +1590,8 @@ int main( ...@@ -1590,10 +1590,8 @@ int main(
byte* xdes = NULL; byte* xdes = NULL;
/* bytes read count */ /* bytes read count */
ulint bytes; ulint bytes;
/* current time */
time_t now;
/* last time */ /* last time */
time_t lastt; time_t lastt = 0;
/* stat, to get file size. */ /* stat, to get file size. */
#ifdef _WIN32 #ifdef _WIN32
struct _stat64 st; struct _stat64 st;
...@@ -1946,7 +1944,6 @@ int main( ...@@ -1946,7 +1944,6 @@ int main(
/* main checksumming loop */ /* main checksumming loop */
cur_page_num = start_page ? start_page : cur_page_num + 1; cur_page_num = start_page ? start_page : cur_page_num + 1;
lastt = 0;
while (!feof(fil_in)) { while (!feof(fil_in)) {
bytes = read_file(buf, partial_page_read, bytes = read_file(buf, partial_page_read,
...@@ -2026,12 +2023,10 @@ int main( ...@@ -2026,12 +2023,10 @@ int main(
if (verbose && !read_from_stdin) { if (verbose && !read_from_stdin) {
if ((cur_page_num % 64) == 0) { if ((cur_page_num % 64) == 0) {
now = time(0); time_t now = time(0);
if (!lastt) { if (!lastt) {
lastt= now; lastt= now;
} } else if (now - lastt >= 1 && is_log_enabled) {
if (now - lastt >= 1
&& is_log_enabled) {
fprintf(log_file, "page::%llu " fprintf(log_file, "page::%llu "
"okay: %.3f%% done\n", "okay: %.3f%% done\n",
(cur_page_num - 1), (cur_page_num - 1),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment