clang/gcc: enable a bunch more warnings (#91)
* clang/gcc: enable -pedantic warnings
* suppress a GCC-specific warning in stb_image
* And some clang-specific warnings
* -Wconversion (clang) -Wold-style-cast (clang+gcc)
and fix a few warnings that show up with these (and a few more with
-Wconversion on gcc, even though that's not enabled by default)
* bunch more warnings
* fixes
* remove merge error
diff --git a/examples/HelloTriangle.cpp b/examples/HelloTriangle.cpp
index c5335b5..d98bfb8 100644
--- a/examples/HelloTriangle.cpp
+++ b/examples/HelloTriangle.cpp
@@ -63,7 +63,7 @@
// Initialize the texture with arbitrary data until we can load images
std::vector<uint8_t> data(4 * 1024 * 1024, 0);
for (size_t i = 0; i < data.size(); ++i) {
- data[i] = i % 253;
+ data[i] = static_cast<uint8_t>(i % 253);
}