api: add OIIO_NODISCARD_ERROR to tiffutils.h#5215
Conversation
Add OIIO_NODISCARD_ERROR to the following functions in tiffutils.h to enforce that callers check their bool return values: - decode_exif - decode_iptc_iim - encode_iptc_iim - decode_xmp - decode_icc_profile Fix callers in tiffoutput.cpp, png_pvt.h, and webpinput.cpp that were previously ignoring return values. - Assisted-by: Claude Sonnet 4.6 Signed-off-by: rose413 <116857309+rose413@users.noreply.github.com>
| /// plugin. Note that IIM is actually considered obsolete and is | ||
| /// replaced by an XML scheme called XMP. | ||
| OIIO_API bool decode_iptc_iim (string_view iptc, ImageSpec &spec); | ||
| OIIO_NODISCARD_ERROR OIIO_API bool decode_iptc_iim (string_view iptc, ImageSpec &spec); |
There was a problem hiding this comment.
This line is fine, sorry, GitHub won't let me comment on lines that you don't change, so I have to put this here!
But another 4 lines down, there is a function that could use an OIIO_NODISCARD_ERROR that you didn't add.
Also somewhat above, the exif_tag_lookup and gps_tag_lookup functions.
… tiffutils.h - Annotate decode_exif, decode_iptc_iim, exif_tag_lookup , and gps_tag_lookup with OIIO_NODISCARD_ERROR. - Fix all call sites in png_pvt.h, tiffinput.cpp, and jpeginput.cpp - Assisted-by: Claude Sonnet 4.6 Signed-off-by: rose413 <116857309+rose413@users.noreply.github.com>
|
This seems to be failing most of the CI jobs. Is your GitHub fork set up with the option that allows ordinary pushes to your own fork (prior to submitting a PR) to trigger running the CI workflows? |
|
Hi, @rose413, this is failing a lot of the CI tests, can you please take a look? |
|
@rose413 Are you planning to come back to this? |
|
Hi! I am so sorry for the delay. I've been busy wrapping up some school-related work and assignments. I'm planning to finish this PR within the next few days. |
|
No problem, and no rush! School comes first. |
Description
Add OIIO_NODISCARD_ERROR to the following functions in tiffutils.h to enforce that callers check their bool return values:
Fix callers in tiffoutput.cpp, png_pvt.h, and webpinput.cpp that were previously ignoring return values.
Tests
Checklist:
and if I used AI coding assistants, I have an
Assisted-by: TOOL / MODELline in the pull request description above.
behavior.
PR, by pushing the changes to my fork and seeing that the automated CI
passed there. (Exceptions: If most tests pass and you can't figure out why
the remaining ones fail, it's ok to submit the PR and ask for help. Or if
any failures seem entirely unrelated to your change; sometimes things break
on the GitHub runners.)
fixed any problems reported by the clang-format CI test.
corresponding Python bindings. If altering ImageBufAlgo functions, I also
exposed the new functionality as oiiotool options.