From 5279e78c9f1b10cdd8c466a22f2c1cfb04dc30c5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 11 Apr 2019 13:09:01 +0200 Subject: [PATCH] [libcalamares] Reduce warnings - improve variable names, don't shadow --- src/libcalamares/utils/CommandList.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libcalamares/utils/CommandList.cpp b/src/libcalamares/utils/CommandList.cpp index 8e332a066..6a9d68bef 100644 --- a/src/libcalamares/utils/CommandList.cpp +++ b/src/libcalamares/utils/CommandList.cpp @@ -45,21 +45,21 @@ static CommandLine get_variant_object( const QVariantMap& m ) static CommandList_t get_variant_stringlist( const QVariantList& l ) { CommandList_t retl; - unsigned int c = 0; + unsigned int count = 0; for ( const auto& v : l ) { if ( v.type() == QVariant::String ) retl.append( CommandLine( v.toString(), CommandLine::TimeoutNotSet ) ); else if ( v.type() == QVariant::Map ) { - auto c( get_variant_object( v.toMap() ) ); - if ( c.isValid() ) - retl.append( c ); + auto command( get_variant_object( v.toMap() ) ); + if ( command.isValid() ) + retl.append( command ); // Otherwise warning is already given } else - cWarning() << "Bad CommandList element" << c << v.type() << v; - ++c; + cWarning() << "Bad CommandList element" << count << v.type() << v; + ++count; } return retl; }