From: John Wolfe Date: Tue, 19 Apr 2022 21:30:53 +0000 (-0700) Subject: ContainerInfo Plugin: correct compiler warnings in containerInfo_grpc.cc X-Git-Tag: stable-12.1.0~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=532cf9f3bb9dd3011239fb193f7458fc78ae921e;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__);