-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fixes for Clang warnings #6768
base: main
Are you sure you want to change the base?
Fixes for Clang warnings #6768
Conversation
I was trying to compile triton server with default Clang 15 and got a few warnings that triggered as errors, among those: * deprecation errors from open telemetry showing up, which shouldn't be an issue here. They come up because the headers aren't included as "SYSTEM" headers. * unused parameter in TritonParser::SetGlobalTraceArgs(). There is a `explicit_disable_trace` passed as bool, that was updated but never read. I believe this was intended to be a `bool&` @oandreeva-nv ? (error: parameter 'explicit_disable_trace' set but not used [-Werror,-Wunused-but-set-parameter]) * An unused `[this]` capture (-Wunused-lambda-capture) * Assignment with `std::move` of temporary variable resulting in: ` error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]` I am not quite sure what's the problem, but I think the std::move is redundant here anyway? * a few conditionally uninitialised variables in tests variable 'ba_memory_type' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] * unused private field in ` HTTPAPIServer`: error: private field 'end_' is not used [-Werror,-Wunused-private-field] bool end_{false};
18d6052
to
975036a
Compare
@@ -2134,7 +2134,7 @@ void | |||
TritonParser::SetGlobalTraceArgs( | |||
TritonServerParameters& lparams, bool trace_level_present, | |||
bool trace_rate_present, bool trace_count_present, | |||
bool explicit_disable_trace) | |||
bool& explicit_disable_trace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Thanks for the fix
Hi @HennerM, thanks for the contributions, these look great! Can you update the branch and resolve the conflicts? Then we can run some quick tests to make sure nothing breaks and approve. |
|
I was trying to compile triton server with default Clang 15 and got a few warnings that triggered as errors, among those:
explicit_disable_trace
passed as bool, that was updated but never read. I believe this was intended to be abool&
@oandreeva-nv ? (error: parameter 'explicit_disable_trace' set but not used [-Werror,-Wunused-but-set-parameter])[this]
capture (-Wunused-lambda-capture)std::move
of temporary variable resulting in:error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
I am not quite sure what's the problem, but I think the std::move is redundant here anyway?HTTPAPIServer
: error: private field 'end_' is not used [-Werror,-Wunused-private-field]bool end_{false};
There is more in the core and backend repos that I will raise separately