Skip to content

Commit

Permalink
MDEV-19740: Silence a bogus "may be uninitialized" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Aug 15, 2019
1 parent ec28f95 commit d07936a
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions extra/innochecksum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1590,10 +1590,8 @@ int main(
byte* xdes = NULL;
/* bytes read count */
ulint bytes;
/* current time */
time_t now;
/* last time */
time_t lastt;
time_t lastt = 0;
/* stat, to get file size. */
#ifdef _WIN32
struct _stat64 st;
Expand Down Expand Up @@ -1946,7 +1944,6 @@ int main(
/* main checksumming loop */
cur_page_num = start_page ? start_page : cur_page_num + 1;

lastt = 0;
while (!feof(fil_in)) {

bytes = read_file(buf, partial_page_read,
Expand Down Expand Up @@ -2026,12 +2023,10 @@ int main(

if (verbose && !read_from_stdin) {
if ((cur_page_num % 64) == 0) {
now = time(0);
time_t now = time(0);
if (!lastt) {
lastt= now;
}
if (now - lastt >= 1
&& is_log_enabled) {
} else if (now - lastt >= 1 && is_log_enabled) {
fprintf(log_file, "page::%llu "
"okay: %.3f%% done\n",
(cur_page_num - 1),
Expand Down

0 comments on commit d07936a

Please sign in to comment.