[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-gengetopt] options with values and enum type
From: |
Papp Gyozo (VBuster) |
Subject: |
Re: [help-gengetopt] options with values and enum type |
Date: |
Tue, 06 Nov 2007 12:48:57 +0100 |
Hi
> Gyozo, you'll be happy to hear that options with values can now be given
> enum type :-)
Yes, I'm happy indeed. I started to test it. It looks ok for me though I
haven't finshed yet. Minor warning issues with MSVC 6/2005 compilers:
1) "warning C4761: integral size mismatch in argument; conversion supplied"
appears wherever update_arg() was called. Some of the arguments are defined as
'short' but the corresponding local variables in the main *_internal() function
declared as 'int':
int override;
int initialize;
int check_required;
int check_ambiguity;
IMHO we could deal with it ;) No real use of short, simply change it to int.
2) "warning C4018: '<' : signed/unsigned mismatch" in get_multiple_arg_token():
while (arg[i] && (j < len-1))
'len' is size_t (unsigned) while 'j' is (signed) int by default.
3) "warning C4018: '!=' : signed/unsigned mismatch" in
check_multiple_option_occurrences():
if (option_given != min)
'option_given' argument has type unsigned int but min is a simple int again.
The same goes for 'max' in this function.
I used what I found here today:
http://rap.dsi.unifi.it/~bettini/gengetopt-2.22b.tar.gz