diff --git a/libvisual-plugins/plugins/actor/gforce/Common/GeneralTools/XStrList.cpp b/libvisual-plugins/plugins/actor/gforce/Common/GeneralTools/XStrList.cpp index 4d924c995..6db45bb0d 100644 --- a/libvisual-plugins/plugins/actor/gforce/Common/GeneralTools/XStrList.cpp +++ b/libvisual-plugins/plugins/actor/gforce/Common/GeneralTools/XStrList.cpp @@ -95,13 +95,12 @@ long XStrList::Add( const UtilStr& inStr ) { long XStrList::FetchBestMatch( const UtilStr& inStr ) { - long best, bestScore, score, i; - UtilStr* str; - - best = 0; + long bestScore = 0; + long best = 0; + UtilStr* str; - for ( i = 1; mStrings.Fetch( i, (void**) &str ); i++ ) { - score = str -> LCSMatchScore( inStr ); + for ( long i = 1; mStrings.Fetch( i, (void**) &str ); i++ ) { + long score = str -> LCSMatchScore( inStr ); if ( score > bestScore || i == 1 ) { best = i; bestScore = score; diff --git a/libvisual-plugins/plugins/actor/gforce/Common/UI/LineXX.cpp b/libvisual-plugins/plugins/actor/gforce/Common/UI/LineXX.cpp index 363ac313a..6eb5792ed 100644 --- a/libvisual-plugins/plugins/actor/gforce/Common/UI/LineXX.cpp +++ b/libvisual-plugins/plugins/actor/gforce/Common/UI/LineXX.cpp @@ -137,7 +137,7 @@ halfW = ( tw ) >> 1; if ( tw < 12 ) { - const char* c_shape; + const char* c_shape = nullptr; __circ( tw, c_shape ) for ( j = 0; j < tw; j++ ) { c_x = c_shape[ j ]; diff --git a/libvisual-plugins/plugins/actor/gforce/Common/io/CEgIStream.cpp b/libvisual-plugins/plugins/actor/gforce/Common/io/CEgIStream.cpp index e8ac37d18..f4c3b4035 100644 --- a/libvisual-plugins/plugins/actor/gforce/Common/io/CEgIStream.cpp +++ b/libvisual-plugins/plugins/actor/gforce/Common/io/CEgIStream.cpp @@ -50,7 +50,7 @@ short int CEgIStream::GetShort() { unsigned char CEgIStream::GetByte() { - unsigned char c; + unsigned char c = 0; if ( mIsTied ) { if ( mPos != 0 ) { @@ -74,7 +74,7 @@ unsigned char CEgIStream::GetByte() { unsigned char CEgIStream::PeekByte() { - unsigned char c; + unsigned char c = 0; if ( mIsTied ) { if ( mPos != 0 ) diff --git a/libvisual-plugins/plugins/actor/gforce/GForceCommon/GF_Palette.cpp b/libvisual-plugins/plugins/actor/gforce/GForceCommon/GF_Palette.cpp index 3ae1acc02..130b6baeb 100644 --- a/libvisual-plugins/plugins/actor/gforce/GForceCommon/GF_Palette.cpp +++ b/libvisual-plugins/plugins/actor/gforce/GForceCommon/GF_Palette.cpp @@ -40,8 +40,10 @@ void GF_Palette::Assign( const ArgList& inArgs ) { void GF_Palette::Evaluate( PixPalEntry outPalette[ 256 ] ) { - int i; - float H, S, V, inc = 1.0 / 255.0; + float H = 0.0; + float S = 0.0; + float V = 0.0; + float inc = 1.0 / 255.0; *mIntensity = 0; @@ -50,7 +52,7 @@ void GF_Palette::Evaluate( PixPalEntry outPalette[ 256 ] ) { if ( ! mS_I_Dep ) S = mS.Evaluate(); if ( ! mV_I_Dep ) V = mV.Evaluate(); - for ( i = 0; i < 256; i++, *mIntensity += inc ) { + for ( int i = 0; i < 256; i++, *mIntensity += inc ) { // Don't reevaluate vars that are indep of i if ( mH_I_Dep ) H = mH.Evaluate();