diff mbox series

[4/4] btrfs-progs: tests/fsstress.c: move delete_subvol_children under HAVE_BTRFSUTIL_H

Message ID 03ed9298c3cf19854db54332d276d179fa666de8.1687485959.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: tests: fix warnings during make test | expand

Commit Message

Anand Jain June 23, 2023, 7:59 a.m. UTC
Bring the  'delete_subvol_children' function under the HAVE_BTRFSUTIL_H
define and fix the following warnings. This function is called only when
'HAVE_BTRFSUTILS_H' is defined.

tests/fsstress.c:1183:1: warning: ‘delete_subvol_children’ defined but not used [-Wunused-function]
 1183 | delete_subvol_children(int parid

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 tests/fsstress.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/tests/fsstress.c b/tests/fsstress.c
index 5fd347ccf1d4..3b8cde847aa1 100644
--- a/tests/fsstress.c
+++ b/tests/fsstress.c
@@ -1179,6 +1179,7 @@  del_from_flist(int ft, int slot)
 		ftp->nfiles--;
 }
 
+#ifdef HAVE_BTRFSUTIL_H
 static void
 delete_subvol_children(int parid)
 {
@@ -1198,6 +1199,7 @@  again:
 		}
 	}
 }
+#endif
 
 static fent_t *
 dirid_to_fent(int dirid)