[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] [patch #6414] Avoid compiler errors/warnings withmem_si

From: Jonathan Larmour
Subject: Re: [lwip-devel] [patch #6414] Avoid compiler errors/warnings withmem_size_t if MEM_LIBC_MALLOC
Date: Wed, 05 Mar 2008 14:53:16 +0000
User-agent: Thunderbird (X11/20070530)

Bill Auerbach wrote:
>> Subject: [lwip-devel] [patch #6414] Avoid compiler errors/warnings
>> withmem_size_t if MEM_LIBC_MALLOC
>> Follow-up Comment #1, patch #6414 (project lwip):
>> Yes please Jifl, can you check this in prior to the final 1.3.0 release?
>> There was some concern on the lwip-devel mailing list that the value of
>> mem_malloc wasn't being cast, but as I understand it (void *) shouldn't
> need a
>> cast, and so I'm not worried about that.  Of course, it's harmless to do
> the
>> cast, so if others need this for their compiler I've no objection to it
> going in.
> My 2 cents on this is I don't think changes should be made for compilations
> with turned up warnings above what standard C requires.

[NB it's better to reply within the patch webpage, I didn't see this till now]

I think it's ok to do little changes like this as long as it doesn't overly
negatively affect readability, and has no effect on code size.

An example of the latter is where some variables get preinitialised to
silence a warning about a variable potentially being accessed without
having been initialised, even though in practice the code is written such
that it never would be accessed uninitialised. I would prefer to live with
warnings in that case (or use a compiler-specific construct or pragma to
turn that warning off there).

eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine

reply via email to

[Prev in Thread] Current Thread [Next in Thread]