Skip to content
Permalink
Browse files

Fix misc. MinGW and Valgrind warnings

  • Loading branch information
kwolekr committed Nov 8, 2015
1 parent ad5ac39 commit 6f95bb1ef371c5e838f0df4d6e3edd9d6b132bf9
Showing with 6 additions and 2 deletions.
  1. +1 −0 src/localplayer.cpp
  2. +2 −0 src/minimap.cpp
  3. +2 −1 src/threading/thread.cpp
  4. +1 −1 src/util/serialize.cpp
@@ -42,6 +42,7 @@ LocalPlayer::LocalPlayer(IGameDef *gamedef, const char *name):
last_pitch(0),
last_yaw(0),
last_keyPressed(0),
camera_impact(0.f),
last_animation(NO_ANIM),
hotbar_image(""),
hotbar_selected_image(""),
@@ -216,6 +216,8 @@ Mapper::Mapper(IrrlichtDevice *device, Client *client)
this->m_shdrsrc = client->getShaderSource();
this->m_ndef = client->getNodeDefManager();

m_angle = 0.f;

// Initialize static settings
m_enable_shaders = g_settings->getBool("enable_shaders");
m_surface_mode_scan_height =
@@ -264,7 +264,8 @@ DWORD WINAPI Thread::threadProc(LPVOID param)
thr->m_running = false;
g_logger.deregisterThread();

return NULL;
// 0 is returned here to avoid an unnecessary ifdef clause
return 0;
}


@@ -229,7 +229,7 @@ std::string deSerializeLongString(std::istream &is)

Buffer<char> buf2(s_size);
is.read(&buf2[0], s_size);
if (is.gcount() != s_size)
if ((u32)is.gcount() != s_size)
throw SerializationError("deSerializeLongString: couldn't read all chars");

s.reserve(s_size);

0 comments on commit 6f95bb1

Please sign in to comment.