Skip to content

Fix clang-tidy readability-isolate-declaration finding in generated code#47

Merged
timwoj merged 1 commit into
masterfrom
topic/timw/clang-tidy-fixes
Jun 27, 2025
Merged

Fix clang-tidy readability-isolate-declaration finding in generated code#47
timwoj merged 1 commit into
masterfrom
topic/timw/clang-tidy-fixes

Conversation

@timwoj

@timwoj timwoj commented Jun 27, 2025

Copy link
Copy Markdown
Member

This fixes this finding in a few binpac analyzers:

/Users/tim/Desktop/projects/zeek-master/build/src/analyzer/protocol/gssapi/gssapi_pac.cc:846:9: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
  846 |         const_byteptr t_begin_of_data, t_end_of_data;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tim/Desktop/projects/zeek-master/build/src/analyzer/protocol/gssapi/gssapi_pac.cc:862:9: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
  862 |         const_byteptr t_begin_of_data, t_end_of_data;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8416 warnings generated.

Related to zeek/zeek#4612

@timwoj
timwoj requested a review from bbannier June 27, 2025 20:01
@timwoj
timwoj merged commit 25451ee into master Jun 27, 2025
1 check passed
@timwoj
timwoj deleted the topic/timw/clang-tidy-fixes branch June 27, 2025 20:09
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