Fixed some warnings on GCC
Mozilla has recently made using NULL as integer an error (via
-Werror=conversion-null GCC flag), which caused ANGLE to no longer compile on
mingw in Mozilla tree. The ones that may not be obvious are removal of some <0
checks. They are not needed because they were done on unsigned types.
Author: Jacek Caban
http://codereview.appspot.com/6679049
(With changes to apply to dx11proto branch)
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1464 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/Renderer9.cpp b/src/libGLESv2/renderer/Renderer9.cpp
index fa9f090..1e5c7b1 100644
--- a/src/libGLESv2/renderer/Renderer9.cpp
+++ b/src/libGLESv2/renderer/Renderer9.cpp
@@ -385,12 +385,12 @@
D3DDISPLAYMODE currentDisplayMode;
mD3d9->GetAdapterDisplayMode(mAdapter, ¤tDisplayMode);
- int numRenderFormats = sizeof(RenderTargetFormats) / sizeof(RenderTargetFormats[0]);
- int numDepthFormats = sizeof(DepthStencilFormats) / sizeof(DepthStencilFormats[0]);
+ unsigned int numRenderFormats = sizeof(RenderTargetFormats) / sizeof(RenderTargetFormats[0]);
+ unsigned int numDepthFormats = sizeof(DepthStencilFormats) / sizeof(DepthStencilFormats[0]);
(*configDescList) = new ConfigDesc[numRenderFormats * numDepthFormats];
int numConfigs = 0;
- for (int formatIndex = 0; formatIndex < numRenderFormats; formatIndex++)
+ for (unsigned int formatIndex = 0; formatIndex < numRenderFormats; formatIndex++)
{
D3DFORMAT renderTargetFormat = RenderTargetFormats[formatIndex];
@@ -398,7 +398,7 @@
if (SUCCEEDED(result))
{
- for (int depthStencilIndex = 0; depthStencilIndex < numDepthFormats; depthStencilIndex++)
+ for (unsigned int depthStencilIndex = 0; depthStencilIndex < numDepthFormats; depthStencilIndex++)
{
D3DFORMAT depthStencilFormat = DepthStencilFormats[depthStencilIndex];
HRESULT result = D3D_OK;