btrfs-progs: Fix -Wsuggest-attribute=format warning

Add __attribute__ ((format (printf, 4, 0))) to fix the vprintf calling
function.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2018-12-05 14:40:11 +08:00 committed by David Sterba
parent 436677aab0
commit 278c64b208
1 changed files with 1 additions and 0 deletions

View File

@ -48,6 +48,7 @@ struct string_table *table_create(int columns, int rows)
* '>' the text is right aligned. If fmt is equal to '=' the text will
* be replaced by a '=====' dimensioned on the basis of the column width
*/
__attribute__ ((format (printf, 4, 0)))
char *table_vprintf(struct string_table *tab, int column, int row,
const char *fmt, va_list ap)
{