From c8b8f4035665259f80bdfc077c6958f8a99a4a97 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 18 Mar 2010 00:30:45 +0000 Subject: [PATCH] - Fix some GCC warnings. SVN r2213 (trunk) --- src/nodebuild.cpp | 2 +- src/textures/ddstexture.cpp | 2 +- src/v_text.cpp | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/nodebuild.cpp b/src/nodebuild.cpp index 90aaff492e..83393f7c3a 100644 --- a/src/nodebuild.cpp +++ b/src/nodebuild.cpp @@ -789,7 +789,7 @@ void FNodeBuilder::SplitSegs (DWORD set, node_t &node, DWORD splitseg, DWORD &ou newvert.y += fixed_t(frac * double(Vertices[seg->v2].y - newvert.y)); vertnum = VertexMap->SelectVertexClose (newvert); - if (vertnum == seg->v1 || vertnum == seg->v2) + if (vertnum == (unsigned int)seg->v1 || vertnum == (unsigned int)seg->v2) { Printf("SelectVertexClose selected endpoint of seg %u\n", set); } diff --git a/src/textures/ddstexture.cpp b/src/textures/ddstexture.cpp index ab5b4505de..da9ec59556 100644 --- a/src/textures/ddstexture.cpp +++ b/src/textures/ddstexture.cpp @@ -769,7 +769,7 @@ void FDDSTexture::DecompressDXT5 (FWadLump &lump, bool premultiplied, BYTE *tcbu BYTE *block; PalEntry color[4]; BYTE palcol[4]; - DWORD yalphaslice; + DWORD yalphaslice = 0; int ox, oy, x, y, i; for (oy = 0; oy < Height; oy += 4) diff --git a/src/v_text.cpp b/src/v_text.cpp index 715e060935..55dbcc774a 100644 --- a/src/v_text.cpp +++ b/src/v_text.cpp @@ -317,7 +317,8 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string) FBrokenLines lines[128]; // Support up to 128 lines (should be plenty) const BYTE *space = NULL, *start = string; - int i, c, w, nw; + size_t i, ii; + int c, w, nw; FString lastcolor, linecolor; bool lastWasSpace = false; int kerning = font->GetDefaultKerning (); @@ -418,11 +419,11 @@ FBrokenLines *V_BreakLines (FFont *font, int maxwidth, const BYTE *string) // Make a copy of the broken lines and return them FBrokenLines *broken = new FBrokenLines[i+1]; - for (c = 0; c < i; ++c) + for (ii = 0; ii < i; ++ii) { - broken[c] = lines[c]; + broken[ii] = lines[ii]; } - broken[c].Width = -1; + broken[ii].Width = -1; return broken; }