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/ComputeBoids.cpp b/examples/ComputeBoids.cpp
index cb8ab60..c21ff26 100644
--- a/examples/ComputeBoids.cpp
+++ b/examples/ComputeBoids.cpp
@@ -81,7 +81,7 @@
}
}
- for (int i = 0; i < 2; i++) {
+ for (size_t i = 0; i < 2; i++) {
particleBuffers[i] = device.CreateBufferBuilder()
.SetAllowedUsage(nxt::BufferUsageBit::TransferDst | nxt::BufferUsageBit::Vertex | nxt::BufferUsageBit::Storage)
.SetInitialUsage(nxt::BufferUsageBit::TransferDst)
@@ -261,7 +261,7 @@
void initCommandBuffers() {
static const uint32_t zeroOffsets[1] = {0};
- for (int i = 0; i < 2; ++i) {
+ for (size_t i = 0; i < 2; ++i) {
auto& bufferSrc = particleBuffers[i];
auto& bufferDst = particleBuffers[(i + 1) % 2];
commandBuffers[i] = device.CreateCommandBufferBuilder()