Skip to content

Commit 3800c89

Browse files
committed
lib: use PRINTF_LIKE instead of pragma's to ignore -Wformat-nonliteral
1 parent ad17e80 commit 3800c89

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

lib/cb_util.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,9 @@
2828
#include <stdlib.h>
2929
#include <string.h>
3030
#include <stdarg.h>
31-
#include <errno.h>
3231

3332
#include "xbps_api_impl.h"
3433

35-
#ifdef __clang__
36-
#pragma clang diagnostic ignored "-Wformat-nonliteral"
37-
#endif
38-
3934
void HIDDEN
4035
xbps_set_cb_fetch(struct xbps_handle *xhp,
4136
off_t file_size,
@@ -62,7 +57,7 @@ xbps_set_cb_fetch(struct xbps_handle *xhp,
6257
(*xhp->fetch_cb)(&xfcd, xhp->fetch_cb_data);
6358
}
6459

65-
int HIDDEN
60+
int HIDDEN PRINTF_LIKE(5, 6)
6661
xbps_set_cb_state(struct xbps_handle *xhp,
6762
xbps_state_t state,
6863
int err,

lib/util.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242

4343
#include "xbps_api_impl.h"
4444

45-
#ifdef __clang__
46-
#pragma clang diagnostic ignored "-Wformat-nonliteral"
47-
#endif
48-
4945
static bool
5046
is_revision(const char *str)
5147
{

0 commit comments

Comments
 (0)