diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2022-03-16 14:29:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-16 14:29:18 -0400 |
| commit | b89c8bdc10a2ba04ed7b4967e6b895958ce225e3 (patch) | |
| tree | 41fc973e63c0bf3401957290f96bc3a167f56f9b /lib/northbound_grpc.cpp | |
| parent | 51012eb636470b085837ee8f9962785d9d89a060 (diff) | |
| parent | ad6bd536923b60a906df28252c2567f4d156272a (diff) | |
Merge pull request #10804 from LabNConsulting/chopps/coverity-1
lib: grpc: fix covevrity warnings
Diffstat (limited to 'lib/northbound_grpc.cpp')
| -rw-r--r-- | lib/northbound_grpc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp index dda1756214..9cb999110b 100644 --- a/lib/northbound_grpc.cpp +++ b/lib/northbound_grpc.cpp @@ -223,7 +223,7 @@ class RpcStateBase pthread_mutex_t cmux = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cond = PTHREAD_COND_INITIALIZER; CallState state = CREATE; - CallState entered_state; + CallState entered_state = CREATE; public: const char *name; @@ -1153,7 +1153,9 @@ static void *grpc_pthread_start(void *arg) std::unique_ptr<grpc::Server> server = builder.BuildAndStart(); s_server = server.get(); + pthread_mutex_lock(&s_server_lock); // Make coverity happy grpc_running = true; + pthread_mutex_unlock(&s_server_lock); // Make coverity happy /* Schedule unary RPC handlers */ REQUEST_NEWRPC(GetCapabilities, NULL); |
