Skip to content

Commit

Permalink
netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build
Browse files Browse the repository at this point in the history
>> 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: 4c559f1 ("netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
ummakynes committed May 27, 2020
1 parent 94945ad commit 4946ea5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/netfilter/nf_conntrack_pptp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_pptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 4946ea5

Please sign in to comment.