Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins (gforce): Fix GCC warnings #291

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ short int CEgIStream::GetShort() {


unsigned char CEgIStream::GetByte() {
unsigned char c;
unsigned char c = 0;

if ( mIsTied ) {
if ( mPos != 0 ) {
Expand All @@ -74,7 +74,7 @@ unsigned char CEgIStream::GetByte() {


unsigned char CEgIStream::PeekByte() {
unsigned char c;
unsigned char c = 0;

if ( mIsTied ) {
if ( mPos != 0 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand Down