Makefiles: Avoid pointer repurposing

This commit is contained in:
Sebastian Holtermann
2019-05-17 12:30:08 +02:00
parent 0d41b45cc9
commit adc3459707
+4 -4
View File
@@ -247,13 +247,13 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
// Write out the "special" stuff // Write out the "special" stuff
lg->WriteSpecialTargetsTop(makefileStream); lg->WriteSpecialTargetsTop(makefileStream);
// write the target convenience rules // Write the target convenience rules
for (cmLocalGenerator* localGen : this->LocalGenerators) { for (cmLocalGenerator* localGen : this->LocalGenerators) {
lg = static_cast<cmLocalUnixMakefileGenerator3*>(localGen); this->WriteConvenienceRules2(
this->WriteConvenienceRules2(makefileStream, lg); makefileStream, static_cast<cmLocalUnixMakefileGenerator3*>(localGen));
} }
lg = static_cast<cmLocalUnixMakefileGenerator3*>(this->LocalGenerators[0]); // Write special bottom targets
lg->WriteSpecialTargetsBottom(makefileStream); lg->WriteSpecialTargetsBottom(makefileStream);
} }