Commit 6e1b493
authored
int: Turn on OIIO_NODISCARD_ERROR_ENABLE for internal builds (#5145)
Rearrange the automatic setting of `OIIO_NODISCARD_ERROR_ENABLE` so that
for external (not OIIO itself) builds, we default to enabling for OIIO
>= 3.3, and disabling for older and current versions. But now, when
building OIIO itself, it is ENABLED regardless of version.
So this means that as we add OIIO_NODISCARD_ERROR annotations to
functions, we MUST fix any calls to those functions where we ourselves
don't check their return values, and can't accidentally add new breaking
code.
Also, had to fix a bunch of spots that were missed in the original PR,
places where we didn't patch up our sloppy uses of what was annotated in
that patch. I'm not sure I understand how these could have been missed
in that last PR, since that PR did fix other uses of the annotated
functions.
Signed-off-by: Larry Gritz <lg@larrygritz.com>1 parent c6c80bc commit 6e1b493
4 files changed
Lines changed: 39 additions & 17 deletions
File tree
- src
- doc
- include/OpenImageIO
- libOpenImageIO
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2202 | 2202 | | |
2203 | 2203 | | |
2204 | 2204 | | |
| 2205 | + | |
2205 | 2206 | | |
2206 | 2207 | | |
2207 | 2208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
480 | 481 | | |
481 | | - | |
| 482 | + | |
| 483 | + | |
482 | 484 | | |
483 | 485 | | |
484 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
487 | 490 | | |
488 | 491 | | |
489 | 492 | | |
| |||
492 | 495 | | |
493 | 496 | | |
494 | 497 | | |
495 | | - | |
496 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
497 | 501 | | |
498 | 502 | | |
499 | 503 | | |
| |||
502 | 506 | | |
503 | 507 | | |
504 | 508 | | |
| 509 | + | |
| 510 | + | |
505 | 511 | | |
506 | | - | |
| 512 | + | |
| 513 | + | |
507 | 514 | | |
508 | 515 | | |
509 | 516 | | |
| |||
515 | 522 | | |
516 | 523 | | |
517 | 524 | | |
518 | | - | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
519 | 529 | | |
520 | 530 | | |
521 | 531 | | |
| |||
524 | 534 | | |
525 | 535 | | |
526 | 536 | | |
527 | | - | |
528 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
529 | 542 | | |
530 | 543 | | |
531 | 544 | | |
| |||
534 | 547 | | |
535 | 548 | | |
536 | 549 | | |
537 | | - | |
| 550 | + | |
| 551 | + | |
538 | 552 | | |
| 553 | + | |
539 | 554 | | |
540 | 555 | | |
541 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
551 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
552 | 556 | | |
553 | 557 | | |
554 | 558 | | |
| |||
0 commit comments