diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-01-15 06:42:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-15 15:15:23 -0500 |
commit | 6311b7ce42e0c1d6d944bc099dc47e936c20cf11 (patch) | |
tree | 828fa5345eea54c7a0107fb0e1bf6c2306458a1d | |
parent | db9ca5cacbda79c3c51c723006418f5b864b47fe (diff) |
netlink: extack: avoid parenthesized string constant warning
NL_SET_ERR_MSG() and NL_SET_ERR_MSG_ATTR() lead to the following warning
in newer versions of gcc:
warning: array initialized from parenthesized string constant
Just remove the parentheses, they're not needed in this context since
anyway since there can be no operator precendence issues or similar.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/netlink.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 49b4257ce1ea..f3075d6c7e82 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -85,7 +85,7 @@ struct netlink_ext_ack { | |||
85 | * to the lack of an output buffer.) | 85 | * to the lack of an output buffer.) |
86 | */ | 86 | */ |
87 | #define NL_SET_ERR_MSG(extack, msg) do { \ | 87 | #define NL_SET_ERR_MSG(extack, msg) do { \ |
88 | static const char __msg[] = (msg); \ | 88 | static const char __msg[] = msg; \ |
89 | struct netlink_ext_ack *__extack = (extack); \ | 89 | struct netlink_ext_ack *__extack = (extack); \ |
90 | \ | 90 | \ |
91 | if (__extack) \ | 91 | if (__extack) \ |
@@ -101,7 +101,7 @@ struct netlink_ext_ack { | |||
101 | } while (0) | 101 | } while (0) |
102 | 102 | ||
103 | #define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \ | 103 | #define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \ |
104 | static const char __msg[] = (msg); \ | 104 | static const char __msg[] = msg; \ |
105 | struct netlink_ext_ack *__extack = (extack); \ | 105 | struct netlink_ext_ack *__extack = (extack); \ |
106 | \ | 106 | \ |
107 | if (__extack) { \ | 107 | if (__extack) { \ |