Commit 7dac76b
committed
[vt, sdf, usd] fix array-bounds warnings on GCC 13
Five false-positive warning sites caused by GCC 13 losing bound
information during aggressive inlining.
pxr/base/vt/streamOut.cpp
Ensure dimension is less than Vt_ShapeData::NumOtherDims before
indexing into shape.otherDims
pxr/usd/sdf/schema.cpp
Add TF_AXIOM(static_cast<size_t>(level) < std::size(valueTupleDimensions.d))
to the else-if in _AddValuesToValueContext. GCC cannot bound the plain
size_t size member but can see std::size(d) == 2.
pxr/usd/usd/clip.cpp
Add TF_AXIOM(numTimes <= brackingTimes.size()) so GCC can see that numTimes
is correctly bounded before std::sort1 parent 15a2bff commit 7dac76b
3 files changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
1539 | 1540 | | |
1540 | 1541 | | |
1541 | 1542 | | |
| 1543 | + | |
1542 | 1544 | | |
1543 | 1545 | | |
1544 | 1546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
430 | 431 | | |
431 | 432 | | |
432 | 433 | | |
| 434 | + | |
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
| |||
0 commit comments