From adc3459707c4c942b547eb57d02a82b8d5085962 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Fri, 17 May 2019 12:30:08 +0200 Subject: Makefiles: Avoid pointer repurposing --- Source/cmGlobalUnixMakefileGenerator3.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 5486ac0..2f3bc76 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -247,13 +247,13 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2() // Write out the "special" stuff lg->WriteSpecialTargetsTop(makefileStream); - // write the target convenience rules + // Write the target convenience rules for (cmLocalGenerator* localGen : this->LocalGenerators) { - lg = static_cast(localGen); - this->WriteConvenienceRules2(makefileStream, lg); + this->WriteConvenienceRules2( + makefileStream, static_cast(localGen)); } - lg = static_cast(this->LocalGenerators[0]); + // Write special bottom targets lg->WriteSpecialTargetsBottom(makefileStream); } -- cgit v0.12