]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 27 May 2020 10:24:10 +0000 (12:24 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 27 May 2020 11:39:08 +0000 (13:39 +0200)
>> include/linux/netfilter/nf_conntrack_pptp.h:13:20: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
extern const char *const pptp_msg_name(u_int16_t msg);
^~~~~~

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: e9b10d8456bc ("netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/nf_conntrack_pptp.h
net/netfilter/nf_conntrack_pptp.c

index 6a4ff6d5ebc290801d2325c7fe4b4406383d52d7..a28aa289afdca9bd5653764cfbc38f784e1c82ed 100644 (file)
@@ -10,7 +10,7 @@
 #include <net/netfilter/nf_conntrack_expect.h>
 #include <uapi/linux/netfilter/nf_conntrack_tuple_common.h>
 
-extern const char *const pptp_msg_name(u_int16_t msg);
+const char *pptp_msg_name(u_int16_t msg);
 
 /* state of the control session */
 enum pptp_ctrlsess_state {
index 7ad247784cfaa4b1f9c103b77337bb99857b55f1..1f44d523b5121c84057f9f66dc902203090dbd57 100644 (file)
@@ -91,7 +91,7 @@ static const char *const pptp_msg_name_array[PPTP_MSG_MAX + 1] = {
        [PPTP_SET_LINK_INFO]            = "SET_LINK_INFO"
 };
 
-const char *const pptp_msg_name(u_int16_t msg)
+const char *pptp_msg_name(u_int16_t msg)
 {
        if (msg > PPTP_MSG_MAX)
                return pptp_msg_name_array[0];