btrfs-progs: tests: move do_mmap under HAVE_SYS_MMAN_H in fsstress.c
Move the entire 'do_mmap' function under the 'HAVE_SYS_MMAN_H' define and fix the following warnings. This function is called only when 'HAVE_SYS_MMAN_H' is defined. tests/fsstress.c:4363:1: warning: ‘do_mmap’ defined but not used [-Wunused-function] 4363 | do_mmap(opnum_t opno, long r, int prot) Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
3b8a552fd7
commit
282c05698a
|
@ -4359,10 +4359,10 @@ struct print_flags mmap_flags[] = {
|
|||
({translate_flags(flags, "|", mmap_flags);})
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
static void
|
||||
do_mmap(opnum_t opno, long r, int prot)
|
||||
{
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
char *addr;
|
||||
int e;
|
||||
pathname_t f;
|
||||
|
@ -4454,8 +4454,8 @@ do_mmap(opnum_t opno, long r, int prot)
|
|||
|
||||
free_pathname(&f);
|
||||
close(fd);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
mread_f(opnum_t opno, long r)
|
||||
|
|
Loading…
Reference in a new issue