From: Perttu Ahola Date: Sat, 15 Oct 2011 20:07:43 +0000 (+0300) Subject: Fix some "Conditional jump or move depends on uninitialised value(s)" valgrind detections X-Git-Tag: 0.3.dev-20111021~55 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=825953bbdccb4d5e10ee8e932ca2025e5eb7e0a9;p=oweals%2Fminetest.git Fix some "Conditional jump or move depends on uninitialised value(s)" valgrind detections --- diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index 7515664ea..2bee572f0 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -492,10 +492,10 @@ void updateFastFaceRow( u16 continuous_tiles_count = 0; - bool makes_face; + bool makes_face = false; v3s16 p_corrected; v3s16 face_dir_corrected; - u8 lights[4]; + u8 lights[4] = {0,0,0,0}; TileSpec tile; getTileInfo(blockpos_nodes, p, face_dir, daynight_ratio, vmanip, temp_mods, smooth_lighting, diff --git a/src/player.cpp b/src/player.cpp index 86f0be7a1..6a774251c 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -31,7 +31,9 @@ Player::Player(): touching_ground(false), in_water(false), in_water_stable(false), + is_climbing(false), swimming_up(false), + is_frozen(false), inventory_backup(NULL), craftresult_is_preview(true), hp(20),