-
Notifications
You must be signed in to change notification settings - Fork 3
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
clang-tidy test #30
clang-tidy test #30
Conversation
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.
clang-tidy made some suggestions
@@ -184,6 +184,12 @@ namespace eCAL | |||
// blocking call, all responses will be returned in service_response_vec_ | |||
bool CServiceClientImpl::Call(const std::string& method_name_, const std::string& request_, int timeout_ms_, ServiceResponseVecT* service_response_vec_) | |||
{ | |||
// look that clang-tidy ! | |||
service_response_vec_->clear(); | |||
int i; |
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.
warning: variable 'i' is not initialized [cppcoreguidelines-init-variables]
int i; | |
int i = 0; |
// look that clang-tidy ! | ||
service_response_vec_->clear(); | ||
int i; | ||
char* p; |
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.
warning: variable 'p' is not initialized [cppcoreguidelines-init-variables]
char* p; | |
char* p = nullptr; |
service_response_vec_->clear(); | ||
int i; | ||
char* p; | ||
*p = 'X'; |
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.
warning: Dereference of undefined pointer value (loaded from variable 'p') [clang-analyzer-core.NullDereference]
*p = 'X';
^
Additional context
ecal/core/src/service/ecal_service_client_impl.cpp:189: 'p' declared without an initial value
char* p;
^
ecal/core/src/service/ecal_service_client_impl.cpp:190: Dereference of undefined pointer value (loaded from variable 'p')
*p = 'X';
^
No description provided.