Skip to content

Conversation

@Blake-Madden
Copy link

@Blake-Madden Blake-Madden commented Aug 23, 2025

Silences sporadic warnings from clang-tidy

@asmaloney
Copy link
Owner

Hi. What warnings are you seeing & on what versions of clang and gcc?

Everything should be initialized before use in easyexif::EXIFInfo::clear().

I'm not getting warnings locally or in the CI (using -pedantic -Wall -Wextra).

@Blake-Madden
Copy link
Author

Blake-Madden commented Aug 25, 2025

Sorry, it's clang-tidy that reports these warnings. These are pedantic warnings and not really issues, but this PR will at least silence clang-tidy.

@asmaloney
Copy link
Owner

Ah, OK. I can't seem to reproduce that, but we're probably using different settings for clang-tidy.

Could you please copy-paste a sample of the warnings you're getting?

Everything should be initialized right here:

EXIFInfo() { clear(); }

I'm not really inclined to change the style here just to make clang-tidy happy (and this PR now initializes everything twice—with different values in at least one case (ByteAlign)), but maybe we can just suppress the warnings with a #pragma?

@Blake-Madden
Copy link
Author

You could wrap everything in a NOLINTBEGIN and NOLINTEND block, that that seems a bit hackneyed. I have clang-tidy warnings cranked up pretty high, I can just adjust it to not check member initialization in my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants