Eliminating warnings from SwifShader

SwiftShader had over 270 warnings and this
reduces the count to about 90, some of which
can be addressed later, since some are less
trivial to remove. The changes include:
- Making sure we don't build any project with
  RTTI enabled, otherwise, we get some
  vftable size mismatch warnings
- Making sure exception handling is the same
  for all configurations
- Changing minus <unsigned> to the equivalent,
  and valid, ~<unsigned> + 1
- Explicitly casting types to bool by adding
  "!= 0" or "!= nullptr", depending on the case
- Making sure no #define overrules another one
  without first doing the proper #undef of that
  #define
- Removing signed VS unsigned comparisons
- Making sure WinMain is __stdcall

WebGL tests passed.

Change-Id: I8d8d80adc862633b656d7e99c8ea461924fc0ef4
Reviewed-on: https://swiftshader-review.googlesource.com/3475
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Renderer/PixelProcessor.cpp b/src/Renderer/PixelProcessor.cpp
index cae5f4d..afbae78 100644
--- a/src/Renderer/PixelProcessor.cpp
+++ b/src/Renderer/PixelProcessor.cpp
@@ -715,14 +715,14 @@
 		context->setBlendOperationAlpha(blendOperationAlpha);
 	}
 
-	void PixelProcessor::setAlphaReference(int alphaReference)
+	void PixelProcessor::setAlphaReference(float alphaReference)
 	{
 		context->alphaReference = alphaReference;
 
-		factor.alphaReference4[0] = (word)iround((float)alphaReference * 0x1000 / 0xFF);
-		factor.alphaReference4[1] = (word)iround((float)alphaReference * 0x1000 / 0xFF);
-		factor.alphaReference4[2] = (word)iround((float)alphaReference * 0x1000 / 0xFF);
-		factor.alphaReference4[3] = (word)iround((float)alphaReference * 0x1000 / 0xFF);
+		factor.alphaReference4[0] = (word)iround(alphaReference * 0x1000 / 0xFF);
+		factor.alphaReference4[1] = (word)iround(alphaReference * 0x1000 / 0xFF);
+		factor.alphaReference4[2] = (word)iround(alphaReference * 0x1000 / 0xFF);
+		factor.alphaReference4[3] = (word)iround(alphaReference * 0x1000 / 0xFF);
 	}
 
 	void PixelProcessor::setGlobalMipmapBias(float bias)