mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-18 15:32:41 +00:00
Fix -Wuninitialized warnings in release builds
may be used uninitialized in this function
This commit is contained in:
parent
506569529a
commit
d0e5555f72
7 changed files with 20 additions and 7 deletions
|
@ -1315,11 +1315,11 @@ extern unzFile unzOpen (const char* path)
|
|||
uLong central_pos,uL;
|
||||
FILE * fin ;
|
||||
|
||||
uLong number_disk; /* number of the current dist, used for
|
||||
uLong number_disk = 0; /* number of the current dist, used for
|
||||
spaning ZIP, unsupported, always 0*/
|
||||
uLong number_disk_with_CD; /* number the the disk with central dir, used
|
||||
uLong number_disk_with_CD = 0; /* number the the disk with central dir, used
|
||||
for spaning ZIP, unsupported, always 0*/
|
||||
uLong number_entry_CD; /* total number of entries in
|
||||
uLong number_entry_CD = 0; /* total number of entries in
|
||||
the central dir
|
||||
(same than number_entry on nospan) */
|
||||
|
||||
|
@ -1772,7 +1772,7 @@ static int unzlocal_CheckCurrentFileCoherencyHeader (unz_s* s, uInt* piSizeVar,
|
|||
uLong *poffset_local_extrafield,
|
||||
uInt *psize_local_extrafield)
|
||||
{
|
||||
uLong uMagic,uData,uFlags;
|
||||
uLong uMagic,uData,uFlags = 0;
|
||||
uLong size_filename;
|
||||
uLong size_extra_field;
|
||||
int err=UNZ_OK;
|
||||
|
|
|
@ -91,6 +91,7 @@ void R_SurfaceToTextureAxis( const srfTriangles_t *tri, idVec3 &origin, idVec3 a
|
|||
|
||||
area = d0[3] * d1[4] - d0[4] * d1[3];
|
||||
if ( area == 0.0 ) {
|
||||
origin.Zero();
|
||||
axis[0].Zero();
|
||||
axis[1].Zero();
|
||||
axis[2].Zero();
|
||||
|
|
|
@ -1060,8 +1060,9 @@ R_IssueEntityDefCallback
|
|||
bool R_IssueEntityDefCallback( idRenderEntityLocal *def ) {
|
||||
bool update;
|
||||
idBounds oldBounds;
|
||||
const bool checkBounds = r_checkBounds.GetBool();
|
||||
|
||||
if ( r_checkBounds.GetBool() ) {
|
||||
if ( checkBounds ) {
|
||||
oldBounds = def->referenceBounds;
|
||||
}
|
||||
|
||||
|
@ -1075,9 +1076,10 @@ bool R_IssueEntityDefCallback( idRenderEntityLocal *def ) {
|
|||
|
||||
if ( !def->parms.hModel ) {
|
||||
common->Error( "R_IssueEntityDefCallback: dynamic entity callback didn't set model" );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( r_checkBounds.GetBool() ) {
|
||||
if ( checkBounds ) {
|
||||
if ( oldBounds[0][0] > def->referenceBounds[0][0] + CHECK_BOUNDS_EPSILON ||
|
||||
oldBounds[0][1] > def->referenceBounds[0][1] + CHECK_BOUNDS_EPSILON ||
|
||||
oldBounds[0][2] > def->referenceBounds[0][2] + CHECK_BOUNDS_EPSILON ||
|
||||
|
|
|
@ -303,6 +303,9 @@ bool idAASBuild::GetAreaForLeafNode( idBrushBSPNode *node, int *areaNum ) {
|
|||
area.numFaces = 0;
|
||||
area.reach = NULL;
|
||||
area.rev_reach = NULL;
|
||||
area.bounds.Zero();
|
||||
area.center.Zero();
|
||||
area.travelFlags = 0;
|
||||
|
||||
for ( p = node->GetPortals(); p; p = p->Next(s) ) {
|
||||
s = (p->GetNode(1) == node);
|
||||
|
|
|
@ -974,6 +974,11 @@ bool idAASFileLocal::ParseAreas( idLexer &src ) {
|
|||
area.numFaces = src.ParseInt();
|
||||
area.cluster = src.ParseInt();
|
||||
area.clusterAreaNum = src.ParseInt();
|
||||
area.reach = NULL;
|
||||
area.rev_reach = NULL;
|
||||
area.bounds.Zero();
|
||||
area.center.Zero();
|
||||
area.travelFlags = 0;
|
||||
src.ExpectTokenString( ")" );
|
||||
areas.Append( area );
|
||||
ParseReachabilities( src, i );
|
||||
|
|
|
@ -317,6 +317,8 @@ static mapTri_t *FixTriangleAgainstHashVert( const mapTri_t *a, const hashVert_t
|
|||
return NULL;
|
||||
}
|
||||
|
||||
split.Clear();
|
||||
|
||||
// we probably should find the edge that the vertex is closest to.
|
||||
// it is possible to be < 1 unit away from multiple
|
||||
// edges, but we only want to split by one of them
|
||||
|
|
|
@ -636,7 +636,7 @@ static void RasterizeTriangle( const srfTriangles_t *lowMesh, const idVec3 *lowM
|
|||
byte *localDest, *globalDest, *colorDest;
|
||||
float edge[3][3];
|
||||
idVec3 sampledNormal;
|
||||
byte sampledColor[4];
|
||||
byte sampledColor[4] = { };
|
||||
idVec3 point, normal, traceNormal, tangents[2];
|
||||
float baseArea, totalArea;
|
||||
int r, g, b;
|
||||
|
|
Loading…
Reference in a new issue