extern struct error_record *erec_vcreate(enum error_record_types type,
const struct location *loc,
const char *fmt, va_list ap)
- __gmp_fmtstring(3, 0);
+ __fmtstring(3, 0);
extern struct error_record *erec_create(enum error_record_types type,
const struct location *loc,
- const char *fmt, ...) __gmp_fmtstring(3, 4);
+ const char *fmt, ...) __fmtstring(3, 4);
extern void erec_add_location(struct error_record *erec,
const struct location *loc);
extern void erec_destroy(struct error_record *erec);
struct eval_ctx;
extern int expr_binary_error(struct list_head *msgs,
const struct expr *e1, const struct expr *e2,
- const char *fmt, ...) __gmp_fmtstring(4, 5);
+ const char *fmt, ...) __fmtstring(4, 5);
#define expr_error(msgs, expr, fmt, args...) \
expr_binary_error(msgs, expr, NULL, fmt, ## args)
#endif
#define __fmtstring(x, y) __attribute__((format(printf, x, y)))
-#if 0
-#define __gmp_fmtstring(x, y) __fmtstring(x, y)
-#else
-#define __gmp_fmtstring(x, y)
-#endif
#define __must_check __attribute__((warn_unused_result))
#define __noreturn __attribute__((__noreturn__))
if (st.obj) {
return error(&sym->location,
"Could not parse %s expression; did you you mean `%s`?",
- sym->dtype->desc, st.obj);
+ sym->dtype->desc, (const char *)st.obj);
}
return NULL;
if (st.obj) {
return error(&sym->location, "Could not parse %s; did you mean `%s'?",
- sym->dtype->desc, st.obj);
+ sym->dtype->desc, (const char *)st.obj);
}
/* assume user would like to jump to chain as a hint. */
return 0;
default:
return expr_error(ctx->msgs, *expr,
- "Byteorder mismatch: %s expected %s, %s got %s",
+ "Byteorder mismatch: expected %s, %s got %s",
byteorder_names[byteorder],
expr_name(*expr),
byteorder_names[(*expr)->byteorder]);
ctx->inner_desc = NULL;
if (size > NFT_MAX_EXPR_LEN_BITS)
- return expr_error(ctx->msgs, i, "Concatenation of size %u exceeds maximum size of %u",
+ return expr_error(ctx->msgs, i, "Concatenation of size %u exceeds maximum size of %lu",
size, NFT_MAX_EXPR_LEN_BITS);
}
if (payload_byte_size > sizeof(data))
return expr_error(ctx->msgs, stmt->payload.expr,
- "uneven load cannot span more than %u bytes, got %u",
+ "uneven load cannot span more than %zu bytes, got %u",
sizeof(data), payload_byte_size);
if (aligned_fetch && payload_byte_size & 1) {
size += netlink_padded_len(i->len);
if (size > NFT_MAX_EXPR_LEN_BITS)
- return expr_error(ctx->msgs, i, "Concatenation of size %u exceeds maximum size of %u",
+ return expr_error(ctx->msgs, i, "Concatenation of size %u exceeds maximum size of %lu",
size, NFT_MAX_EXPR_LEN_BITS);
}
payload_raw_len : NUM
{
if ($1 > NFT_MAX_EXPR_LEN_BITS) {
- erec_queue(error(&@1, "raw payload length %u exceeds upper limit of %u",
+ erec_queue(error(&@1, "raw payload length %lu exceeds upper limit of %lu",
$1, NFT_MAX_EXPR_LEN_BITS),
state->msgs);
YYERROR;