The warning is bogus since strtok_r doesn't use the value when it's
first called and initializes it for the following calls.
---
 src/qemu/qemu_command.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index bde3904..7dd8e03 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5621,7 +5621,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
     if (def->ndisks > 0) {
         const char *ceph_args = qemuFindEnv(progenv, "CEPH_ARGS");
         if (ceph_args) {
-            char *hosts, *port, *saveptr, *token;
+            char *hosts, *port, *saveptr = NULL, *token;
             virDomainDiskDefPtr first_rbd_disk = NULL;
             for (i = 0 ; i < def->ndisks ; i++) {
                 virDomainDiskDefPtr disk = def->disks[i];
-- 
1.7.3.4

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

Reply via email to