[Patches] warning in timemodule.c

Greg Stein gstein@lyra.org
Sun, 28 May 2000 03:19:11 -0700 (PDT)


On Sun, 28 May 2000, Peter Schneider-Kamp wrote:
> Greg Stein wrote:
> > Better Solution:
> > change the declaration to "const char *s;"
> 
> The problem is that strptime returns an integer on my platform
> (linux 2.2.13, glibc 2.1xx).

Woah. On my RH 6.1 box (glibc 2.1.2), it is a char*.

>...
> > -1 on the type cast patch.
> > +1 on changing the declaration of "s".
> 
> -1-on-changing-the-declaration-because-it-does-not-work-;-)-ly y'rs

hehe... okee dokee, fair enough. I had figured the cast was in there to
drop a const, not to convert from an integer(!). icky.

Bleck. Does the header have the wrong declaration, or is it just not
declared?

For the former: the cast seems to the right answer (with a comment noting
why the cast was inserted!)

For the latter: insert a declaration of strptime. Not sure on the best way
to accomplish, tho :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/