From: John Wolfe Date: Wed, 20 Apr 2022 20:24:07 +0000 (-0700) Subject: ContainerInfo Plugin: correct compiler warnings in containerInfo_grpc.cc X-Git-Tag: stable-12.0.5~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e9e2c6b8927a6c5bfc240fd598ea0763fa6ab4a;p=thirdparty%2Fopen-vm-tools.git ContainerInfo Plugin: correct compiler warnings in containerInfo_grpc.cc - The local variable "containersAdded" should be an 'unsigned int' since it's compared with an 'unsigned int' parameter. - Remove the unreferenced local variable "numContainers". --- diff --git a/open-vm-tools/services/plugins/containerInfo/containerInfo_grpc.cc b/open-vm-tools/services/plugins/containerInfo/containerInfo_grpc.cc index 5f6aa7a68..31aebbba4 100644 --- a/open-vm-tools/services/plugins/containerInfo/containerInfo_grpc.cc +++ b/open-vm-tools/services/plugins/containerInfo/containerInfo_grpc.cc @@ -67,13 +67,12 @@ ContainerInfo_GetContainerList(const char *ns, // IN std::unique_ptr taskStub; grpc::Status status; int i; - int containersAdded; + unsigned int containersAdded; const ListContainersRequest req; std::unique_ptr res; grpc::ClientContext containerContext; static const std::string namespaceKey = "containerd-namespace"; gchar *unixSocket = NULL; - int numContainers = 0; if (ns == NULL || containerdSocketPath == NULL) { g_warning("%s: Invalid arguments specified.\n", __FUNCTION__);