History

workqueue: add printf attribute to __alloc_workqueue()

Fix a compiler warning with W=1: kernel/workqueue.c: error: function ‘__alloc_workqueue’ might be a candidate for ‘gnu_printf’ format attribute[-Werror=suggest-attribute=format] 5657 | name_len = vsnprintf(wq->name, sizeof(wq->name), fmt, args); | ^~~~~~~~

Su Hui committed 1 year ago

Commit d57212f1 parent de359941 file · +1 −0Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+1−0
@@ -5645,6 +5645,7 @@ static void wq_adjust_max_active(struct workqueue_struct *wq) · 5644 unmodified lines
56455645 } while (activated);
56465646 }
56475647
5648+__printf(1, 0)
56485649 static struct workqueue_struct *__alloc_workqueue(const char *fmt,
56495650 unsigned int flags,
56505651 int max_active, va_list args)