diff --git a/source/gui/Desktop.cpp b/source/gui/Desktop.cpp
index 953b42af7c4a8fef7fc2775ff30634298d34cd2b..e779cc5b44b29f7643d66d96283a37645bc7b3f5 100644
--- a/source/gui/Desktop.cpp
+++ b/source/gui/Desktop.cpp
@@ -78,9 +78,9 @@ namespace gui
 
 		point a[] = {
 			{0, 0, 0, 0.0f, 0.0f},
-			{m_iWidth, 0, 0, 1.0f, 0.0f},
-			{m_iWidth, m_iHeight, 0, 1.0f, 1.0f},
-			{0, m_iHeight, 0, 0.0f, 1.0f}
+			{(float)m_iWidth, 0, 0, 1.0f, 0.0f},
+			{(float)m_iWidth, (float)m_iHeight, 0, 1.0f, 1.0f},
+			{0, (float)m_iHeight, 0, 0.0f, 1.0f}
 		};
 
 		m_pVertices = GetGUI()->getDevice()->createVertexBuffer(sizeof(point) * 4, GXBUFFER_USAGE_STATIC, a);
diff --git a/source/gui/ICSS.cpp b/source/gui/ICSS.cpp
index 238559f0df8797b6cff18a27707d3703fba0a69b..d2a6be6822bc1aec220ef574c038a38b53a15bea 100644
--- a/source/gui/ICSS.cpp
+++ b/source/gui/ICSS.cpp
@@ -241,7 +241,7 @@ namespace gui
 						UINT d = 0, o = 0;
 						WCHAR cn;
 						StringW prm = str.substr(pos + 1);
-						UINT c = swscanf_s(prm.c_str(), L"%d%c-%d", &d, &cn, sizeof(cn), &o);
+						UINT c = swscanf_s(prm.c_str(), L"%d%c-%d", &d, &cn, 1, &o);
 						if(c >= 1)
 						{
 							nth_num = d;
@@ -3599,7 +3599,7 @@ namespace gui
 				}
 			}
 
-			int n = swscanf_s(_val.c_str(), L"%f%c%c", &p, &a, sizeof(a), &b, sizeof(b));
+			int n = swscanf_s(_val.c_str(), L"%f%c%c", &p, &a, 1, &b, 1);
 			clr->set(p);
 			if(n == 1)
 			{
diff --git a/source/gui/IRenderFrame.cpp b/source/gui/IRenderFrame.cpp
index 73f0b0956ff29144a03e3a6252513bb2490d8844..331550250ffba637cd68677bd552b4be23f6771b 100644
--- a/source/gui/IRenderFrame.cpp
+++ b/source/gui/IRenderFrame.cpp
@@ -1749,16 +1749,16 @@ namespace gui
 					};
 					point a[6] = {
 						{0, 0, 0, rc},
-						{m_iWidth, 0, 0, rc},
-						{0, (float)(m_iHeight), 0, rc},
-						{0, (float)(m_iHeight), 0, rc},
-						{m_iWidth, 0, 0, rc},
-						{m_iWidth, (float)(m_iHeight), 0, rc}
+						{(float)m_iWidth, 0, 0, rc},
+						{0, (float)m_iHeight, 0, rc},
+						{0, (float)m_iHeight, 0, rc},
+						{(float)m_iWidth, 0, 0, rc},
+						{(float)m_iWidth, (float)(m_iHeight), 0, rc}
 					};
 					point2 apdx8[] = {
 						{0, 0, 0},
-						{m_iWidth, 0, 0},
-						{m_iWidth, (float)(m_iHeight), 0},
+						{(float)m_iWidth, 0, 0},
+						{(float)m_iWidth, (float)(m_iHeight), 0},
 						{0, (float)(m_iHeight), 0}
 					};
 					
diff --git a/source/render/shadow.cpp b/source/render/shadow.cpp
index a0bde712ac104884ec221c29a8ae39bec9771a56..da86307579272462d8a0bdf8c4650b1f7bce94db 100644
--- a/source/render/shadow.cpp
+++ b/source/render/shadow.cpp
@@ -670,7 +670,7 @@ void CShadowPSSM::updateFrustums()
 	m_pCamera->getUp(&vUp);
 	float fAspectRatio = (float)*r_win_width / (float)*r_win_height;
 	float fFovTan = tanf(*r_effective_fov * 0.5f);
-	for(UINT i = 0; i < *r_pssm_splits; ++i)
+	for(int i = 0; i < *r_pssm_splits; ++i)
 	{
 		Split &split = m_splits[i];