From 15eeb94d2c4b1798d08bcfdebfe12a10ced3a09f Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Thu, 29 Aug 2024 16:50:24 +0200 Subject: [PATCH] tests: fix `-Wmissing-variable-declarations` warnings in vfs tests ``` ../../../../tests/lib/vfs/vfs_parse_ls_lga.c:39:23: warning: no previous extern declaration for non-static variable 'test_subclass1' [-Wmissing-variable-declarations] struct vfs_s_subclass test_subclass1; ^ ../../../../tests/lib/vfs/vfs_parse_ls_lga.c:42:21: warning: no previous extern declaration for non-static variable 'vfs_root_entry' [-Wmissing-variable-declarations] struct vfs_s_entry *vfs_root_entry; ^ ../../../../tests/lib/vfs/vfs_s_get_path.c:40:23: warning: no previous extern declaration for non-static variable 'test_subclass1' [-Wmissing-variable-declarations] struct vfs_s_subclass test_subclass1, test_subclass2, test_subclass3; ^ ``` Signed-off-by: Yury V. Zaytsev --- tests/lib/vfs/vfs_parse_ls_lga.c | 4 ++-- tests/lib/vfs/vfs_s_get_path.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lib/vfs/vfs_parse_ls_lga.c b/tests/lib/vfs/vfs_parse_ls_lga.c index 4867adafb..8820d9511 100644 --- a/tests/lib/vfs/vfs_parse_ls_lga.c +++ b/tests/lib/vfs/vfs_parse_ls_lga.c @@ -36,10 +36,10 @@ #include "src/vfs/local/local.c" -struct vfs_s_subclass test_subclass1; +static struct vfs_s_subclass test_subclass1; static struct vfs_class *vfs_test_ops1 = VFS_CLASS (&test_subclass1); -struct vfs_s_entry *vfs_root_entry; +static struct vfs_s_entry *vfs_root_entry; static struct vfs_s_inode *vfs_root_inode; static struct vfs_s_super *vfs_test_super; diff --git a/tests/lib/vfs/vfs_s_get_path.c b/tests/lib/vfs/vfs_s_get_path.c index cf0aa6a8c..81513bc69 100644 --- a/tests/lib/vfs/vfs_s_get_path.c +++ b/tests/lib/vfs/vfs_s_get_path.c @@ -37,7 +37,7 @@ #define ETALON_VFS_NAME "#test2:user:pass@host.net" #define ETALON_VFS_URL_NAME "test2://user:pass@host.net" -struct vfs_s_subclass test_subclass1, test_subclass2, test_subclass3; +static struct vfs_s_subclass test_subclass1, test_subclass2, test_subclass3; static struct vfs_class *vfs_test_ops1 = VFS_CLASS (&test_subclass1); static struct vfs_class *vfs_test_ops2 = VFS_CLASS (&test_subclass2); static struct vfs_class *vfs_test_ops3 = VFS_CLASS (&test_subclass3);