Skip to content

Commit ad17e80

Browse files
committed
lib/log.c: use PRINTF_LIKE to suppress -Wformat-nonliteral
1 parent c28a7a5 commit ad17e80

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/log.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,10 @@
2525
*/
2626

2727
#include <stdio.h>
28-
#include <errno.h>
2928
#include <stdarg.h>
3029

3130
#include "xbps/macro.h"
32-
#include "xbps_api_impl.h"
33-
34-
#ifdef __clang__
35-
#pragma clang diagnostic ignored "-Wformat-nonliteral"
36-
#endif
31+
#include "xbps.h"
3732

3833
int xbps_debug_level = 0;
3934
int xbps_verbose_level = 0;
@@ -46,7 +41,7 @@ int xbps_verbose_level = 0;
4641
* Use these functions to log errors, warnings and debug messages.
4742
*/
4843

49-
static void
44+
static void PRINTF_LIKE(3, 0)
5045
common_printf(FILE *f, const char *msg, const char *fmt, va_list ap)
5146
{
5247
if (msg != NULL)

0 commit comments

Comments
 (0)