Skip to contentSkip to conversation

fsstress: Indicate sg_handler's argument is unused

PATCH New Palmer Dabbelt 2 participants 3 messages Feb 18, 2021 – Mar 2, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 fsstress: Indicate sg_handler's argument is unused

This argument can't be removed because it's part of sigaction, but it's triggering an unused argument warning.

---
 testcases/kernel/fs/fsstress/fsstress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/fs/fsstress/fsstress.c +1 -1
index 811e6ff14..b53a99180 100644
@@ -280,7 +280,7 @@ void usage(void);
 void write_freq(void);
 void zero_freq(void);
 
-void sg_handler(int signum)
+void sg_handler(int signum __attribute__((unused)))
 {
 	should_stop = 1;
 }
Signature · 1 line
2.30.0.478.g8a0d178c01-goog
#1 lore raw

PATCH 2/2 fsstress: Indicate one of sync_f's arguments is unused

This argument is necessary to make sync_f's prototype match opfnc_t for the op table, but is otherwise unused and triggers an unused argument warning.

---
 testcases/kernel/fs/fsstress/fsstress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/fs/fsstress/fsstress.c +1 -1
index b53a99180..42ee696a5 100644
@@ -2501,7 +2501,7 @@ void symlink_f(int opno, long r)
 }
 
 /* ARGSUSED */
-void sync_f(int opno, long r)
+void sync_f(int opno, long r __attribute__((unused)))
 {
 	sync();
 	if (verbose)
Signature · 1 line
2.30.0.478.g8a0d178c01-goog