Fix compiler warnings
Added missing checks for return values of various function calls. Fixed binlogrouter strerror_r usage and wrong buffer sizes.
This commit is contained in:
@ -3556,7 +3556,12 @@ blr_start_slave(ROUTER_INSTANCE* router, ROUTER_SLAVE* slave)
|
||||
router->prevbinlog,
|
||||
router->last_safe_pos);
|
||||
/* Truncate previous binlog file to last_safe pos */
|
||||
truncate(file, router->last_safe_pos);
|
||||
if (truncate(file, router->last_safe_pos) == -1)
|
||||
{
|
||||
char err[MXS_STRERROR_BUFLEN];
|
||||
MXS_ERROR("Failed to truncate file: %d, %s",
|
||||
errno, strerror_r(errno, err, sizeof(err)));
|
||||
}
|
||||
|
||||
/* Log it */
|
||||
MXS_WARNING("A transaction is still opened at pos %lu"
|
||||
|
Reference in New Issue
Block a user