]> xenbits.xensource.com Git - libvirt.git/commitdiff
virpcimock: Make @fakerootdir static
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 22 Oct 2019 11:10:20 +0000 (13:10 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 12 Nov 2019 15:15:59 +0000 (16:15 +0100)
Since we are not passing the @fakerootdir variable to any inline function
anymore, we can make the variable static.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
tests/virpcimock.c

index 0d502db68cd51745533adbba028dfbe039c4a29b..7e4554a1dc7371a8147e8382cb9cb7fb8c7fba99 100644 (file)
@@ -39,11 +39,7 @@ static int (*real_close)(int fd);
 static DIR * (*real_opendir)(const char *name);
 static char *(*real_virFileCanonicalizePath)(const char *path);
 
-/* Don't make static, since it causes problems with clang
- * when passed as an arg to virAsprintf()
- * vircgroupmock.c:462:22: error: static variable 'fakesysfsdir' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline]
- */
-char *fakerootdir;
+static char *fakerootdir;
 
 /* To add a new mocked prefix in virpcimock:
  * - add the prefix here as a define to make it easier to track what we