diff options
author | Maciej Żenczykowski <maze@google.com> | 2019-10-17 11:20:50 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2019-10-29 13:51:21 -0400 |
commit | d5432a966f13a90a0cd429d3f4d8785905be92e9 (patch) | |
tree | a15370c4db92f289a81cababfcd4909844a10e72 | |
parent | c430e7511f0d304a1365384ca617a813e1a6602b (diff) | |
download | ethtool-d5432a966f13a90a0cd429d3f4d8785905be92e9.tar.gz |
fix unused parameter warnings in do_version() and show_usage()
This fixes:
external/ethtool/ethtool.c:473:43: error: unused parameter 'ctx' [-Werror,-Wunused-parameter]
static int do_version(struct cmd_context *ctx)
external/ethtool/ethtool.c:5392:43: error: unused parameter 'ctx' [-Werror,-Wunused-parameter]
static int show_usage(struct cmd_context *ctx)
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0cc52f33bb0e8d7627f5e84bb4e3dfa821d17cc8
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | ethtool.c | 4 | ||||
-rw-r--r-- | internal.h | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -470,7 +470,7 @@ static int rxflow_str_to_type(const char *str) return flow_type; } -static int do_version(struct cmd_context *ctx) +static int do_version(struct cmd_context *ctx maybe_unused) { fprintf(stdout, PACKAGE " version " VERSION @@ -5484,7 +5484,7 @@ static const struct option { {} }; -static int show_usage(struct cmd_context *ctx) +static int show_usage(struct cmd_context *ctx maybe_unused) { int i; @@ -23,6 +23,8 @@ #include <sys/ioctl.h> #include <net/if.h> +#define maybe_unused __attribute__((__unused__)) + /* ethtool.h expects these to be defined by <linux/types.h> */ #ifndef HAVE_BE_TYPES typedef uint16_t __be16; |