git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] 64bit issue in test-parse-options.c

From
H.Merijn Brand <h.m.brand@xs4all.nl>
Date
Jul 30, 2008, 12:44 UTC
Message-ID
<20080730144452.797d8686@pc09.procura.nl>
In-Reply-To
<20080730123713.GA31392@artemis.madism.org>

On Wed, 30 Jul 2008 14:37:13 +0200, Pierre Habouzit <madcoder@debian.org> wrote:

Show 34 quoted lines
> On Wed, Jul 30, 2008 at 12:16:56PM +0000, H.Merijn Brand wrote:
> > git-1.5.6.4 - HP-UX 11.23 64bit compile
> > 
> > * expecting success:
> >         test-parse-options -s123 -b -i 1729 -b -vv -n > output 2> output.err &&
> >         test_cmp expect output &&
> >         test ! -s output.err
> > 
> > --- expect      2008-07-30 11:52:05 +0000
> > +++ output      2008-07-30 11:52:05 +0000
> > @@ -1,5 +1,5 @@
> >  boolean: 2
> > -integer: 1729
> > +integer: 7425998454784
> >  string: 123
> >  abbrev: 7
> >  verbose: 2
> > * FAIL 2: short options
> > 
> > I'm sure you can come up with a more sensible change, but the current
> > code is definitely wrong
> > 
> > 
> > --8<---
> > --- test-parse-options.c.org    2008-07-30 11:57:16 +0000
> > +++ test-parse-options.c        2008-07-30 12:08:56 +0000
> > @@ -2,6 +2,7 @@
> >  #include "parse-options.h"
> > 
> >  static int boolean = 0;
> > +static unsigned int int_integer = 0;
> >  static unsigned long integer = 0;
> 
>   long is wrong in the first place, parse-opt only uses ints.
If I change it to int, the date parsing goes bogus.
-- 
H.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
Previous: Pierre HabouzitNext: Pierre Habouzit
Message 3 of 8 in “64bit issue in test-parse-options.c”
  1. 64bit issue in test-parse-options.cH.Merijn Brand, Jul 30, 2008
  2. Pierre HabouzitJul 30, 2008
  3. H.Merijn BrandJul 30, 2008
  4. Pierre HabouzitJul 30, 2008
  5. Junio C HamanoJul 30, 2008
  6. Pierre HabouzitJul 30, 2008
  7. H.Merijn BrandJul 30, 2008
  8. Petr BaudisJul 31, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.