mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:17:55 +00:00
[build] Address warnings in gcc 11 and 12.
TEST=local builds Bug: https://github.com/dart-lang/sdk/issues/50645 Change-Id: If6cd26620feff06abd449be0f7d1dd1e620b8411 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275841 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
ff2d661d5b
commit
f181b50249
|
@ -67,6 +67,7 @@ void CpuInfo::Cleanup() {
|
|||
bool CpuInfo::FieldContains(CpuInfoIndices idx, const char* search_string) {
|
||||
if (method_ == kCpuInfoCpuId) {
|
||||
const char* field = CpuId::field(idx);
|
||||
if (field == NULL) return false;
|
||||
bool contains = (strstr(field, search_string) != NULL);
|
||||
free(const_cast<char*>(field));
|
||||
return contains;
|
||||
|
|
|
@ -640,6 +640,7 @@ const char* ImageWriter::SectionSymbol(ProgramSection section, bool vm) {
|
|||
case ProgramSection::BuildId:
|
||||
return kSnapshotBuildIdAsmSymbol;
|
||||
}
|
||||
UNREACHABLE();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue