Commit af15570a authored by Joey Adams's avatar Joey Adams Committed by Rusty Russell

opt: Fix warnings with gcc-4.5 (same approach as commit 6535bdee)

&*ptr is used in some other macros, but at a glance, they look like
cases where the pointer shouldn't be NULL .  Didn't change those,
and if we get more warnings, we'll cross that bridge when we get to it.
For now, I suppose they are just free NULL checks.
parent ca4485a1
...@@ -298,7 +298,7 @@ char *opt_usage_and_exit(const char *extra); ...@@ -298,7 +298,7 @@ char *opt_usage_and_exit(const char *extra);
/* Resolves to the four parameters for non-arg callbacks. */ /* Resolves to the four parameters for non-arg callbacks. */
#define OPT_CB_NOARG(cb, arg) \ #define OPT_CB_NOARG(cb, arg) \
OPT_NOARG, \ OPT_NOARG, \
cast_if_any(char *(*)(void *), (cb), &*(cb), \ cast_if_any(char *(*)(void *), (cb), (cb)+0, \
char *(*)(typeof(*(arg))*), \ char *(*)(typeof(*(arg))*), \
char *(*)(const typeof(*(arg))*), \ char *(*)(const typeof(*(arg))*), \
char *(*)(const void *)), \ char *(*)(const void *)), \
...@@ -307,11 +307,11 @@ char *opt_usage_and_exit(const char *extra); ...@@ -307,11 +307,11 @@ char *opt_usage_and_exit(const char *extra);
/* Resolves to the four parameters for arg callbacks. */ /* Resolves to the four parameters for arg callbacks. */
#define OPT_CB_ARG(cb, show, arg) \ #define OPT_CB_ARG(cb, show, arg) \
OPT_HASARG, NULL, \ OPT_HASARG, NULL, \
cast_if_any(char *(*)(const char *,void *), (cb), &*(cb), \ cast_if_any(char *(*)(const char *,void *), (cb), (cb)+0, \
char *(*)(const char *, typeof(*(arg))*), \ char *(*)(const char *, typeof(*(arg))*), \
char *(*)(const char *, const typeof(*(arg))*), \ char *(*)(const char *, const typeof(*(arg))*), \
char *(*)(const char *, const void *)), \ char *(*)(const char *, const void *)), \
cast_if_type(void (*)(char buf[], const void *), (show), &*(show), \ cast_if_type(void (*)(char buf[], const void *), (show), (show)+0, \
void (*)(char buf[], const typeof(*(arg))*)), \ void (*)(char buf[], const typeof(*(arg))*)), \
(arg) (arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment