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
5645 } while (activated);5645 } while (activated);
5646}5646}
5647 5647
5648__printf(1, 0)
5648static struct workqueue_struct *__alloc_workqueue(const char *fmt,5649static struct workqueue_struct *__alloc_workqueue(const char *fmt,
5649 unsigned int flags,5650 unsigned int flags,
5650 int max_active, va_list args)5651 int max_active, va_list args)