[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Modules pypcre.c,2.18,2.19

Thomas Wouters thomas@xs4all.net
Thu, 6 Jul 2000 20:09:24 +0200


On Thu, Jul 06, 2000 at 02:27:32PM +0200, Thomas Wouters wrote:

> 	PyObject_INIT((PyObject *)b, &PyBuffer_Type);
> 
> The 'value computed' is useless. The value computed is computed by the ','
> operator, but the only things in there are sideffect operators. The last
> operation in the string of ',''s is either a void-returning function or an
> assignment, so I'd classify this one as a cosmetic bug in gcc ;) adding a
> '(void)' cast to the PyObject_INIT() macro or the calls to it would fix the
> warning.

Er, ignore that. The value computed isn't useless, it's just the first
argument. I overlooked that, sorry :P The return value is used in a couple
of places. That leaves only one option to squench this warning, a (void)
cast at the one spot that causes a warning. Or is there a better way ?

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!