Fix code for warnings: unused-but-set-variable and warn_unused_result.
This commit is contained in:
@ -493,8 +493,9 @@ bool mxb_log_init(const char* ident,
|
|||||||
if (this_unit.sLogger && this_unit.redirect_stdout)
|
if (this_unit.sLogger && this_unit.redirect_stdout)
|
||||||
{
|
{
|
||||||
// Redirect stdout and stderr to the log file
|
// Redirect stdout and stderr to the log file
|
||||||
freopen(this_unit.sLogger->filename(), "a", stdout);
|
FILE* unused __attribute__ ((unused));
|
||||||
freopen(this_unit.sLogger->filename(), "a", stderr);
|
unused = freopen(this_unit.sLogger->filename(), "a", stdout);
|
||||||
|
unused = freopen(this_unit.sLogger->filename(), "a", stderr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -620,8 +621,9 @@ bool mxb_log_rotate()
|
|||||||
if (this_unit.redirect_stdout && rval)
|
if (this_unit.redirect_stdout && rval)
|
||||||
{
|
{
|
||||||
// Redirect stdout and stderr to the log file
|
// Redirect stdout and stderr to the log file
|
||||||
freopen(this_unit.sLogger->filename(), "a", stdout);
|
FILE* unused __attribute__ ((unused));
|
||||||
freopen(this_unit.sLogger->filename(), "a", stderr);
|
unused = freopen(this_unit.sLogger->filename(), "a", stdout);
|
||||||
|
unused = freopen(this_unit.sLogger->filename(), "a", stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
|
@ -863,10 +863,9 @@ bool MariaDBMonitor::failover_perform(ClusterOperation& op)
|
|||||||
* time is out at this point, wait_cluster_stabilization() will check the slaves
|
* time is out at this point, wait_cluster_stabilization() will check the slaves
|
||||||
* once so that latest status is printed. */
|
* once so that latest status is printed. */
|
||||||
wait_cluster_stabilization_ex(op, redirected_slaves);
|
wait_cluster_stabilization_ex(op, redirected_slaves);
|
||||||
auto step4_time = timer.lap();
|
|
||||||
MXS_DEBUG("Failover: slave replication confirmation took %.1f seconds with "
|
MXS_DEBUG("Failover: slave replication confirmation took %.1f seconds with "
|
||||||
"%.1f seconds to spare.",
|
"%.1f seconds to spare.",
|
||||||
step4_time.secs(), op.time_remaining.secs());
|
timer.lap(), op.time_remaining.secs());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rval;
|
return rval;
|
||||||
|
Reference in New Issue
Block a user