Commit ae5b766
committed
Prefer fixed-width integer types instead of size_t
An implementation is free to use any representation it likes for size_t.
In general you'll have 32-bit size_t on 32-bit programs.
Fixes warnings:
openvdb_ax/openvdb_ax/codegen/StandardFunctions.cc: In instantiation of 'SeedType openvdb::v10_0::ax::codegen::{anonymous}::hashToSeed(size_t) [with SeedType = unsigned int; size_t = unsigned int]':
openvdb_ax/openvdb_ax/codegen/StandardFunctions.cc:978:76: required from here
openvdb_ax/openvdb_ax/codegen/StandardFunctions.cc:56:19: warning: right shift count >= width of type [-Wshift-count-overflow]
56 | } while (hash >>= sizeof(SeedType) * 8);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
and
openvdb_ax/openvdb_ax/test/integration/TestStandardFunctions.cc:1175:23: warning: right shift count >= width of type [-Wshift-count-overflow]
1175 | } while (hash >>= sizeof(uint32_t) * 8);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Mathieu Malaterre <mathieu.malaterre@gmail.com>1 parent 43ecdc2 commit ae5b766
File tree
2 files changed
+3
-3
lines changed- openvdb_ax/openvdb_ax
- codegen
- test/integration
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
958 | | - | |
| 958 | + | |
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1166 | 1166 | | |
1167 | 1167 | | |
1168 | 1168 | | |
1169 | | - | |
| 1169 | + | |
1170 | 1170 | | |
1171 | 1171 | | |
1172 | 1172 | | |
| |||
0 commit comments