engine: try to fix -Wmaybe-uninitialized that may be enabled with -Wuninitialized. Diagnostic is prone to false-positives, as compiler don't have enough data for this
This commit is contained in:
parent
a641488b98
commit
0db1a7743d
5 changed files with 42 additions and 42 deletions
|
@ -342,7 +342,7 @@ SCR_BeginLoadingPlaque
|
||||||
*/
|
*/
|
||||||
void SCR_BeginLoadingPlaque( qboolean is_background )
|
void SCR_BeginLoadingPlaque( qboolean is_background )
|
||||||
{
|
{
|
||||||
float oldclear;
|
float oldclear = 0;;
|
||||||
S_StopAllSounds( true );
|
S_StopAllSounds( true );
|
||||||
cl.audio_prepped = false; // don't play ambients
|
cl.audio_prepped = false; // don't play ambients
|
||||||
cl.video_prepped = false;
|
cl.video_prepped = false;
|
||||||
|
|
|
@ -1915,7 +1915,7 @@ int Con_DrawDebugLines( void )
|
||||||
if( host.realtime < con.notify[i].expire && con.notify[i].key_dest == cls.key_dest )
|
if( host.realtime < con.notify[i].expire && con.notify[i].key_dest == cls.key_dest )
|
||||||
{
|
{
|
||||||
int x, len;
|
int x, len;
|
||||||
int fontTall;
|
int fontTall = 0;
|
||||||
|
|
||||||
Con_DrawStringLen( con.notify[i].szNotify, &len, &fontTall );
|
Con_DrawStringLen( con.notify[i].szNotify, &len, &fontTall );
|
||||||
x = refState.width - Q_max( defaultX, len ) - 10;
|
x = refState.width - Q_max( defaultX, len ) - 10;
|
||||||
|
@ -2238,7 +2238,7 @@ void Con_DrawVersion( void )
|
||||||
{
|
{
|
||||||
// draws the current build
|
// draws the current build
|
||||||
byte *color = g_color_table[7];
|
byte *color = g_color_table[7];
|
||||||
int i, stringLen, width = 0, charH;
|
int i, stringLen, width = 0, charH = 0;
|
||||||
int start, height = refState.height;
|
int start, height = refState.height;
|
||||||
qboolean draw_version = false;
|
qboolean draw_version = false;
|
||||||
string curbuild;
|
string curbuild;
|
||||||
|
|
|
@ -41,7 +41,7 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
|
||||||
int ret;
|
int ret;
|
||||||
short p, a, b, c, pa, pb, pc;
|
short p, a, b, c, pa, pb, pc;
|
||||||
byte *buf_p, *pixbuf, *raw, *prior, *idat_buf = NULL, *uncompressed_buffer = NULL, *rowend;
|
byte *buf_p, *pixbuf, *raw, *prior, *idat_buf = NULL, *uncompressed_buffer = NULL, *rowend;
|
||||||
uint chunk_len, crc32, crc32_check, oldsize = 0, newsize, rowsize;
|
uint chunk_len, crc32, crc32_check, oldsize = 0, newsize = 0, rowsize;
|
||||||
uint uncompressed_size, pixel_size, i, y, filter_type, chunk_sign;
|
uint uncompressed_size, pixel_size, i, y, filter_type, chunk_sign;
|
||||||
qboolean has_iend_chunk = false;
|
qboolean has_iend_chunk = false;
|
||||||
z_stream stream = {0};
|
z_stream stream = {0};
|
||||||
|
|
|
@ -815,7 +815,7 @@ void R_DrawSpriteModel( cl_entity_t *e )
|
||||||
float angle, dot, sr, cr;
|
float angle, dot, sr, cr;
|
||||||
float lerp = 1.0f, ilerp, scale;
|
float lerp = 1.0f, ilerp, scale;
|
||||||
vec3_t v_forward, v_right, v_up;
|
vec3_t v_forward, v_right, v_up;
|
||||||
vec3_t origin, color, color2;
|
vec3_t origin, color, color2 = { 0.0f };
|
||||||
|
|
||||||
if( RI.params & RP_ENVVIEW )
|
if( RI.params & RP_ENVVIEW )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -198,7 +198,7 @@ static void R_DrawSegs( vec3_t source, vec3_t delta, float width, float scale, f
|
||||||
int i, total_segs, segs_drawn;
|
int i, total_segs, segs_drawn;
|
||||||
float div, length, fraction, factor;
|
float div, length, fraction, factor;
|
||||||
float flMaxWidth, vLast, vStep, brightness;
|
float flMaxWidth, vLast, vStep, brightness;
|
||||||
vec3_t perp1, vLastNormal;
|
vec3_t perp1, vLastNormal = { 0.0f };
|
||||||
beamseg_t curSeg;
|
beamseg_t curSeg;
|
||||||
|
|
||||||
if( segments < 2 ) return;
|
if( segments < 2 ) return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue