diff --git a/kernel/drivertools.h b/kernel/drivertools.h index 079701c35cc..8929c342627 100644 --- a/kernel/drivertools.h +++ b/kernel/drivertools.h @@ -364,7 +364,7 @@ struct DriveBit unsigned int hash() const { - unsigned int inner; + unsigned int inner = 0; switch (type_) { case DriveType::NONE: @@ -385,6 +385,9 @@ struct DriveBit case DriveType::MULTIPLE: inner = multiple_.hash(); break; + default: + log_abort(); + break; } return mkhash((unsigned int)type_, inner); } @@ -912,7 +915,7 @@ struct DriveChunk unsigned int hash() const { - unsigned int inner; + unsigned int inner = 0; switch (type_) { case DriveType::NONE: @@ -933,6 +936,9 @@ struct DriveChunk case DriveType::MULTIPLE: inner = multiple_.hash(); break; + default: + log_abort(); + break; } return mkhash((unsigned int)type_, inner); }