mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
vircgroupmock: Make global variables static
Apparently clang was fixed as it no longer considers having global variables static a problem. Make the variables static to be sure they aren't used outside of the source file. This effectively reverts v1.0.6-rc1~198 which started the trend. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
61a12ffe08
commit
c3c1293984
@ -36,14 +36,10 @@ static FILE *(*real_fopen)(const char *path, const char *mode);
|
|||||||
static int (*real_access)(const char *path, int mode);
|
static int (*real_access)(const char *path, int mode);
|
||||||
static int (*real_mkdir)(const char *path, mode_t mode);
|
static int (*real_mkdir)(const char *path, mode_t mode);
|
||||||
|
|
||||||
/* Don't make static, since it causes problems with clang
|
static char *fakerootdir;
|
||||||
* when passed as an arg to asprintf()
|
static char *fakesysfscgroupdir;
|
||||||
* vircgroupmock.c:462:22: error: static variable 'fakesysfsdir' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline]
|
static const char *fakedevicedir0 = FAKEDEVDIR0;
|
||||||
*/
|
static const char *fakedevicedir1 = FAKEDEVDIR1;
|
||||||
char *fakerootdir;
|
|
||||||
char *fakesysfscgroupdir;
|
|
||||||
const char *fakedevicedir0 = FAKEDEVDIR0;
|
|
||||||
const char *fakedevicedir1 = FAKEDEVDIR1;
|
|
||||||
|
|
||||||
|
|
||||||
# define SYSFS_CGROUP_PREFIX "/not/really/sys/fs/cgroup"
|
# define SYSFS_CGROUP_PREFIX "/not/really/sys/fs/cgroup"
|
||||||
|
Loading…
Reference in New Issue
Block a user