]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote_driver: Work around broken clang
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 9 Feb 2023 07:38:17 +0000 (08:38 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 9 Feb 2023 09:12:00 +0000 (10:12 +0100)
In recent commit of v9.0.0-191-gc71c159248 I've introduced
remoteConnectFormatURI() function and in the function @query
variable. Even though, the variable is used, clang-13 fails to
see it. Surprisingly, newer clang is not affected. Fortunately,
swapping the order in which variables are set makes clang happy
again.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/remote/remote_driver.c

index 58cd0abe8c5bacce59c923bb82e6a3adff467f31..a4c60be3d73ab3c7fa72fa086a579db965b0aa4c 100644 (file)
@@ -712,7 +712,7 @@ remoteConnectFormatURI(virURI *uri,
         virURIParamsSetIgnore(uri, false, names);
     }
 
-    query = tmpuri.query = virURIFormatParams(uri);
+    tmpuri.query = query = virURIFormatParams(uri);
 
     ret = virURIFormat(&tmpuri);