Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Code Analysis result Update #2624

Merged
merged 3 commits into from
Jul 16, 2024
Merged

Conversation

Johnney-Jung
Copy link
Contributor

BUG="static code analysis result update"

Build test was done with the command below
make -f tensorflow/lite/micro/tools/make/Makefile test

There will be an additional pull request later related to static code analysis

@Johnney-Jung Johnney-Jung requested a review from a team as a code owner July 12, 2024 07:20
Copy link
Contributor

@rascani rascani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the PR! I had just one minor comment and we'll need to fix some of the code-formatting. I can do those fix-ups if the PR has been marked to allow maintainers to edit the branch. If not, would you mind doing the fixups?

You can fix the formatting using clang-format and:

./tensorflow/lite/micro/tools/ci_build/test_code_style.sh --fix_formatting

@@ -48,6 +48,8 @@ MicroInterpreterGraph::MicroInterpreterGraph(
resource_variables_(resource_variables) {
if (model != nullptr) {
subgraphs_ = model->subgraphs();
} else {
subgraphs_ = nullptr; // Initialize "subgraphs_" based on the value of "model". If "model" is not null, set "subgraphs_" to point to its subgraphs. Otherwise, set it to null to avoid dereferencing a null pointer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just add a default initializer in the class declaration? Similar to what you did for MicroAllocationInfo & MicroAllocator

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked tool that it also can be resolved as you suggested, I'll update the PR

@mergify mergify bot merged commit 7a02496 into tensorflow:main Jul 16, 2024
46 of 47 checks passed
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