-
Knut Anders Hatlen authored
Fix compiler warnings raised by Clang 8. Many instances of -Wshadow-field where member variables were shadowed by function parameters, and one instance of -Wdefaulted-function-deleted. Most of the -Wshadow-field warnings were fixed by renaming the parameter so that it didn't have the same name as a member variable. In one case the shadowing parameter was unused and was removed. In another case the shadowed member variable was made private. And in one case the shadowing parameter was removed so that the function used the member variable instead. In one of the Incident_log_event constructors, the warning revealed a bug. An out-of-memory error path assigned a value to the function parameter immediately before it returned, which has no effect. It meant to assign the value to the member variable in order to mark the binlog event as invalid. Due to other changes after the introduction of this code, even setting the member variable instead of the parameter is not sufficient to mark the event as invalid. Instead, mark it as invalid by calling set_is_valid(). The -Wdefaulted-function-deleted warning was fixed by explicitly deleting the implicitly deleted functions. Change-Id: I833250018db458d9eed10aa26b6b15d2a757e351
Knut Anders Hatlen authoredFix compiler warnings raised by Clang 8. Many instances of -Wshadow-field where member variables were shadowed by function parameters, and one instance of -Wdefaulted-function-deleted. Most of the -Wshadow-field warnings were fixed by renaming the parameter so that it didn't have the same name as a member variable. In one case the shadowing parameter was unused and was removed. In another case the shadowed member variable was made private. And in one case the shadowing parameter was removed so that the function used the member variable instead. In one of the Incident_log_event constructors, the warning revealed a bug. An out-of-memory error path assigned a value to the function parameter immediately before it returned, which has no effect. It meant to assign the value to the member variable in order to mark the binlog event as invalid. Due to other changes after the introduction of this code, even setting the member variable instead of the parameter is not sufficient to mark the event as invalid. Instead, mark it as invalid by calling set_is_valid(). The -Wdefaulted-function-deleted warning was fixed by explicitly deleting the implicitly deleted functions. Change-Id: I833250018db458d9eed10aa26b6b15d2a757e351
Loading