[PATCH mtd-utils 5/7] tests: checkfs: Add previous prototype for do_pwr_dn()

Zhihao Cheng chengzhihao1 at huawei.com
Sat Jan 25 22:42:01 PST 2025


The compiler complains following message:
 tests/checkfs/comm.c:37:5: warning: no previous prototype for
 ‘do_pwr_dn’
The function do_pwr_dn() is only used in tests/checkfs/checkfs.c, but
we still keep it in tests/checkfs/comm.c in case the function() is
used by more callers. Fix it by adding a previous declaration.

Signed-off-by: Zhihao Cheng <chengzhihao1 at huawei.com>
---
 tests/checkfs/comm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/checkfs/comm.c b/tests/checkfs/comm.c
index c8c457e..9f4e20d 100644
--- a/tests/checkfs/comm.c
+++ b/tests/checkfs/comm.c
@@ -28,6 +28,8 @@
 #include <unistd.h>
 #include <string.h>
 
+int do_pwr_dn(int fd, int cycleCnt);
+
 /*
   This is the routine that forms and
   sends the "ok to pwr me down" message
-- 
2.13.6




More information about the linux-mtd mailing list