diff options
| author | Petr Kraus <petr_kraus@email.cz> | 2017-12-09 00:22:39 +0100 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2017-12-12 10:09:32 -0700 |
| commit | bc0ab75bcf390d0512f674fe81887e8b092634c0 (patch) | |
| tree | adf5ceac0ea0c531c8b54f17fd9d4a754ff74d11 /demos/cube.cpp | |
| parent | f0ec4821fb8970635664b67bd7e8c7aa3cb04594 (diff) | |
| download | usermoji-bc0ab75bcf390d0512f674fe81887e8b092634c0.tar.xz | |
build: Clear some compiler warnings
- remove unnecessary ";" after function definitions and namespaces
- fix
wrong type match in printf for handle types
- convert some left-overs to `HandleToUint64`
Diffstat (limited to 'demos/cube.cpp')
| -rw-r--r-- | demos/cube.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/demos/cube.cpp b/demos/cube.cpp index 641289dc..ef90220a 100644 --- a/demos/cube.cpp +++ b/demos/cube.cpp @@ -25,6 +25,7 @@ #endif #include <cassert> +#include <cinttypes> #include <cstdio> #include <cstdlib> #include <cstring> @@ -920,7 +921,7 @@ Demo::Demo() continue; } if (strcmp(argv[i], "--c") == 0 && frameCount == UINT32_MAX && i < argc - 1 && - sscanf(argv[i + 1], "%d", &frameCount) == 1) { + sscanf(argv[i + 1], "%" SCNu32, &frameCount) == 1) { i++; continue; } @@ -2350,7 +2351,7 @@ Demo::Demo() } } while (!strncmp(header, "#", 1)); - sscanf(header, "%u %u", width, height); + sscanf(header, "%" SCNd32 " %" SCNd32, width, height); if (rgba_data == nullptr) { fclose(fPtr); return true; |
