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

Fixes for Clang warnings #6768

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ if(${TRITON_ENABLE_TRACING})
if (NOT WIN32)
target_include_directories(
main
PRIVATE
SYSTEM PRIVATE
${OPENTELEMETRY_CPP_INCLUDE_DIRS}
)
endif()
Expand Down Expand Up @@ -397,7 +397,7 @@ if(${TRITON_ENABLE_HTTP}
if (NOT WIN32 AND ${TRITON_ENABLE_TRACING})
target_include_directories(
http-endpoint-library
PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS}
SYSTEM PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS}
)
endif()

Expand Down Expand Up @@ -512,7 +512,7 @@ if(${TRITON_ENABLE_TRACING})

target_include_directories(
tracing-library
PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS}
SYSTEM PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS}
)

target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion src/command_line_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

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

{
for (const auto& global_setting : lparams.trace_config_map_[""]) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/command_line_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class TritonParser {
void SetGlobalTraceArgs(
TritonServerParameters& lparams, bool trace_level_present,
bool trace_rate_present, bool trace_count_present,
bool explicit_disable_trace);
bool& explicit_disable_trace);
void SetTritonTraceArgs(
TritonServerParameters& lparams, bool trace_filepath_present,
bool trace_log_frequency_present);
Expand Down
2 changes: 1 addition & 1 deletion src/grpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ target_include_directories(
if (NOT WIN32 AND ${TRITON_ENABLE_TRACING})
target_include_directories(
grpc-endpoint-library
PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS}
SYSTEM PRIVATE ${OPENTELEMETRY_CPP_INCLUDE_DIRS}
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/grpc/grpc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ CommonHandler::RegisterLogging()
ctx, request, responder, this->cq_, this->cq_, tag);
};

auto OnExecuteLogging = [this](
auto OnExecuteLogging = [](
inference::LogSettingsRequest& request,
inference::LogSettingsResponse* response,
::grpc::Status* status) {
Expand Down
2 changes: 1 addition & 1 deletion src/grpc/infer_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ ModelInferHandler::Execute(InferHandler::State* state)
TRITONSERVER_InferenceTrace* triton_trace = nullptr;
#ifdef TRITON_ENABLE_TRACING
state->trace_ =
std::move(trace_manager_->SampleTrace(request.model_name()));
trace_manager_->SampleTrace(request.model_name());
if (state->trace_ != nullptr) {
triton_trace = state->trace_->trace_;
}
Expand Down
2 changes: 1 addition & 1 deletion src/grpc/stream_infer_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ ModelStreamInferHandler::Process(InferHandler::State* state, bool rpc_ok)
TRITONSERVER_InferenceTrace* triton_trace = nullptr;
#ifdef TRITON_ENABLE_TRACING
state->trace_ =
std::move(trace_manager_->SampleTrace(request.model_name()));
trace_manager_->SampleTrace(request.model_name());
if (state->trace_ != nullptr) {
triton_trace = state->trace_->trace_;
}
Expand Down
2 changes: 1 addition & 1 deletion src/http_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3056,7 +3056,7 @@ HTTPAPIServer::StartTrace(
{
#ifdef TRITON_ENABLE_TRACING
std::shared_ptr<TraceManager::Trace> trace;
trace = std::move(trace_manager_->SampleTrace(model_name));
trace = trace_manager_->SampleTrace(model_name);
if (trace != nullptr) {
*triton_trace = trace->trace_;

Expand Down
1 change: 0 additions & 1 deletion src/http_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ class HTTPAPIServer : public HTTPServer {
// ensure mutual exclusive access.
std::mutex res_mtx_;
std::queue<evbuffer*> pending_http_responses_;
bool end_{false};
};

// Simple structure that carries the userp payload needed for
Expand Down
2 changes: 1 addition & 1 deletion src/test/dyna_sequence/src/dyna_sequence.cc
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ TRITONBACKEND_ModelInstanceExecute(
responses, r,
TRITONBACKEND_RequestCorrelationId(request, &correlation_id));
} else if (model_state->CorrelationIdType() == "TYPE_STRING") {
const char* correlation_id_str;
const char* correlation_id_str = "";
GUARDED_RESPOND_IF_ERROR(
responses, r,
TRITONBACKEND_RequestCorrelationIdString(
Expand Down
12 changes: 6 additions & 6 deletions src/test/implicit_state/src/implicit_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -939,9 +939,9 @@ TRITONBACKEND_ModelInstanceExecute(
response_state, &buffer_attributes));

// Testing for the StateBuffer attributes
TRITONSERVER_MemoryType ba_memory_type;
int64_t ba_memory_type_id;
size_t ba_byte_size;
TRITONSERVER_MemoryType ba_memory_type = TRITONSERVER_MEMORY_CPU;
int64_t ba_memory_type_id = 0;
size_t ba_byte_size = 0;

GUARDED_RESPOND_IF_ERROR(
responses, r, request,
Expand Down Expand Up @@ -1046,7 +1046,7 @@ TRITONBACKEND_ModelInstanceExecute(
}
TRITONSERVER_MemoryType actual_memory_type = TRITONSERVER_MEMORY_CPU;
int64_t actual_memory_type_id = 0;
char* buffer;
char* buffer = nullptr;

// Request an output buffer in GPU. This is only for testing purposes
// to make sure that GPU output buffers can be requested.
Expand Down Expand Up @@ -1084,7 +1084,7 @@ TRITONBACKEND_ModelInstanceExecute(
}
TRITONSERVER_MemoryType actual_memory_type = TRITONSERVER_MEMORY_GPU;
int64_t actual_memory_type_id = 0;
char* buffer;
char* buffer = nullptr;

// Request an output buffer in GPU. This is only for testing purposes
// to make sure that GPU output buffers can be requested.
Expand All @@ -1111,7 +1111,7 @@ TRITONBACKEND_ModelInstanceExecute(

actual_memory_type = TRITONSERVER_MEMORY_CPU;
actual_memory_type_id = 0;
char* output_buffer;
char* output_buffer = nullptr;
GUARDED_RESPOND_IF_ERROR(
responses, r, request,
TRITONBACKEND_OutputBuffer(
Expand Down