[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-gengetopt] Re: required() patch - my fault, sorry
From: |
Lorenzo Bettini |
Subject: |
[help-gengetopt] Re: required() patch - my fault, sorry |
Date: |
Thu, 07 Oct 2004 18:47:07 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 |
yes I had noticed the warning also in gcc.
thanks
Lore
Gyozo, PAPP (VBuster) wrote:
> Hi,
>
> my previous patch which introduce _required() interface function was
buggy, the "int result" local variable was not initialized, so it was
unpredictable what the function would return in case of no missing options.
>
> @address@hidden (struct @args_info@ *args_info, const char
*prog_name)
> {
> @IF@ check_required_options @THEN@
> int result = EXIT_SUCCESS;
>
> if (@address@hidden(args_info, prog_name, NULL) > 0)
> result = EXIT_FAILURE;
>
> @final_exit@
> @ELSE@
> return EXIT_SUCCESS;
> @ENDIF@
> }
>
>
> --
> Papp, Győző VirusBuster Kft
--
+-----------------------------------------------------+
| Lorenzo Bettini ICQ# lbetto, 16080134 |
| PhD in Computer Science |
| Dip. Sistemi e Informatica, Univ. di Firenze |
| Tel +39 055 4796741, Fax +39 055 4796730 |
| Florence - Italy (GNU/Linux User # 158233) |
| Home Page : http://www.lorenzobettini.it |
| http://music.dsi.unifi.it XKlaim language |
| http://www.lorenzobettini.it/purple Cover Band |
| http://www.gnu.org/software/src-highlite |
| http://www.gnu.org/software/gengetopt |
| http://www.lorenzobettini.it/software/gengen |
| http://www.lorenzobettini.it/software/doublecpp |
+-----------------------------------------------------+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [help-gengetopt] Re: required() patch - my fault, sorry,
Lorenzo Bettini <=