]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
ContainerInfo Plugin: correct compiler warnings in containerInfo_grpc.cc
authorJohn Wolfe <jwolfe@vmware.com>
Tue, 19 Apr 2022 21:30:53 +0000 (14:30 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Tue, 19 Apr 2022 21:30:53 +0000 (14:30 -0700)
- The local variable "containersAdded" should be an 'unsigned int' since
  it's compared with an 'unsigned int' parameter.
- Remove the unreferenced local variable "numContainers".

open-vm-tools/services/plugins/containerInfo/containerInfo_grpc.cc

index 5f6aa7a68e5f8d3b99e3ebd53deca2977ecb2eba..31aebbba42cace0b37a911d0daf57eb967d1df86 100644 (file)
@@ -67,13 +67,12 @@ ContainerInfo_GetContainerList(const char *ns,                   // IN
    std::unique_ptr<Tasks::Stub> taskStub;
    grpc::Status status;
    int i;
-   int containersAdded;
+   unsigned int containersAdded;
    const ListContainersRequest req;
    std::unique_ptr<ListContainersResponse> 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__);