OSDN Git Service

netfilter: fix clang-12 fmt string warnings
authorFlorian Westphal <fw@strlen.de>
Sat, 29 May 2021 16:53:25 +0000 (18:53 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 1 Jun 2021 21:53:51 +0000 (23:53 +0200)
nf_conntrack_h323_main.c:198:6: warning: format specifies type 'unsigned short' but
xt_AUDIT.c:121:9: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_h323_main.c
net/netfilter/xt_AUDIT.c

index aafaff0..2eb31ff 100644 (file)
@@ -194,7 +194,7 @@ static int get_tpkt_data(struct sk_buff *skb, unsigned int protoff,
                if (tcpdatalen == 4) {  /* Separate TPKT header */
                        /* Netmeeting sends TPKT header and data separately */
                        pr_debug("nf_ct_h323: separate TPKT header indicates "
-                                "there will be TPKT data of %hu bytes\n",
+                                "there will be TPKT data of %d bytes\n",
                                 tpktlen - 4);
                        info->tpkt_len[dir] = tpktlen - 4;
                        return 0;
index 9cdc16b..b6a015a 100644 (file)
@@ -117,7 +117,7 @@ static int audit_tg_check(const struct xt_tgchk_param *par)
        const struct xt_audit_info *info = par->targinfo;
 
        if (info->type > XT_AUDIT_TYPE_MAX) {
-               pr_info_ratelimited("Audit type out of range (valid range: 0..%hhu)\n",
+               pr_info_ratelimited("Audit type out of range (valid range: 0..%u)\n",
                                    XT_AUDIT_TYPE_MAX);
                return -ERANGE;
        }