Re: [libvirt] [PATCH] add an assert, to avoid a false-positive NULL-deref warning from clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On the other hand, perhaps a more invasive rewrite would also work while
also avoiding assert(), by hoisting the worker->quitRequest into the while
loop, something like:

      while ((client = qemudPendingJob(server)) == NULL) {
          if (worker->quitRequest
              || virCondWait(&server->job,&server->lock)<  0) {
              virMutexUnlock(&server->lock);
              return NULL;
          }
      }
      if (worker->quitRequest) {
          virMutexUnlock(&client->lock);
          virMutexUnlock(&server->lock);
          return NULL;
      }

Should I write that into patch format?

I think it's best to report the bug to clang's bugzilla and not clutter libvirt too much.

Paolo

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]