diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-05-02 23:19:46 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-05-02 23:19:46 +0000 |
commit | 2225b56ca41494c4bcea616891cfdebb194022f8 (patch) | |
tree | 6e441d853bc2425c5753913b3cbb14b255c5d3bc /lib/util | |
parent | c2995010be9302fcde0c6160201035537e385526 (diff) | |
download | netpbm-mirror-2225b56ca41494c4bcea616891cfdebb194022f8.tar.gz netpbm-mirror-2225b56ca41494c4bcea616891cfdebb194022f8.tar.xz netpbm-mirror-2225b56ca41494c4bcea616891cfdebb194022f8.zip |
Include initializing of option_def_index in OPTENTRYINIT to make it easier to use and avoid set-but-not-used compiler warning
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2732 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/shhopt.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/util/shhopt.h b/lib/util/shhopt.h index 9a446290..6b56bfd4 100644 --- a/lib/util/shhopt.h +++ b/lib/util/shhopt.h @@ -217,7 +217,10 @@ typedef struct { OPTENTRY(shortvalue, longvalue, typevalue, outputvalue, flagvalue) \ } -#define OPTENTINIT OPTION_DEF[0].type = OPT_END +#define OPTENTINIT \ + do {OPTION_DEF_INDEX=0; \ + OPTION_DEF[OPTION_DEF_INDEX].type = OPT_END; \ + } while (0) struct optNameValue { |