File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -1588,7 +1588,7 @@ static bool isInteger(StringRef Val) {
15881588
15891589void MappingTraits<std::unique_ptr<ELFYAML::Chunk>>::mapping(
15901590 IO &IO, std::unique_ptr<ELFYAML::Chunk> &Section) {
1591- ELFYAML::ELF_SHT Type;
1591+ ELFYAML::ELF_SHT Type = ELF::SHT_NULL ;
15921592 StringRef TypeStr;
15931593 if (IO.outputting ()) {
15941594 if (auto *S = dyn_cast<ELFYAML::Section>(Section.get ()))
@@ -1599,8 +1599,6 @@ void MappingTraits<std::unique_ptr<ELFYAML::Chunk>>::mapping(
15991599 // When the Type string does not have a "SHT_" prefix, we know it is not a
16001600 // description of a regular ELF output section.
16011601 TypeStr = getStringValue (IO, " Type" );
1602- // To for fallback to `default` in switch below on error.
1603- Type = ELF::SHT_NULL;
16041602 if (TypeStr.starts_with (" SHT_" ) || isInteger (TypeStr))
16051603 IO.mapRequired (" Type" , Type);
16061604 }
You can’t perform that action at this time.
0 commit comments