Skip to contentSkip to conversation

kernel/workqueue: Use __printf markup to silence compiler in function 'alloc_workqueue'

PATCH Applied Mathieu Malaterre 2 participants 2 messages Mar 12, 2019 – Mar 15, 2019 Workqueue

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/workqueue: Use __printf markup to silence compiler in function 'alloc_workqueue'

Silence warnings (triggered at W=1) by adding relevant __printf attributes.

kernel/workqueue.c:4249:2: warning: function 'alloc_workqueue' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

---
 kernel/workqueue.c | 1 +
 1 file changed, 1 insertion(+)
kernel/workqueue.c +1 -0
index 4026d1871407..56b7cf898f10 100644
@@ -4208,6 +4208,7 @@ static int init_rescuer(struct workqueue_struct *wq)
 	return 0;
 }
 
+__printf(1, 4)
 struct workqueue_struct *alloc_workqueue(const char *fmt,
 					 unsigned int flags,
 					 int max_active, ...)
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 5 lines · Mathieu Malaterre

Silence warnings (triggered at W=1) by adding relevant __printf attributes.

kernel/workqueue.c:4249:2: warning: function 'alloc_workqueue' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

Applied to wq/for-5.2.

Thanks.

Signature · 1 line
tejun