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

[TMVA] Work around warning about unused variables #13837

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tmva/tmva/inc/TMVA/DNN/Architectures/Cpu/CpuTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class TCpuTensor : public TMVA::Experimental::RTensor<AFloat, TCpuBuffer<AFloat>
}
}
assert(ndims <= 2 && shape.size() > 1); // to support shape cases {n,1}
(void) ndims; // avoid warning about unused variable
Copy link
Member

Choose a reason for hiding this comment

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

See #13836 (comment)

Side note:

Suggested change
(void) ndims; // avoid warning about unused variable
(void) sizeof(ndims); // avoid warning about unused variable

is a more generic version of the pattern used here with a guarantee of no side effect no matter what the type of the variable is.

return TCpuMatrix<AFloat>(*(this->GetContainer()), GetHSize(), GetWSize());
}

Expand Down