[Top][All Lists]

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

Re: [avr-libc-dev] quell compiler warning in malloc.c

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] quell compiler warning in malloc.c
Date: Wed, 28 Aug 2002 12:37:49 +0200
User-agent: Mutt/1.2.5i

As Theodore A. Roth wrote:

> Your other fixes look sound but I don't know what the consequences are
> going to be. I always hate casting away other people's code warnings. My
> opinion is that warnings should be delt with immediately and never make it
> into production code.

My guess is that they didn't produce warnings with older compilers.

I'm not quite happy with silencing the warnings either.  I'll have a
look at how much work it would be to complete the *div() function
support so all possible argument mixes are supported.  They're
basically just jump-ins to libgcc (__divmodsi4 etc.) only anyway.
That would allow us to use the appropriate data types throughout all
of these functions.

> I think the qsort, strtol and strtoul changes should be tested before
> committing. If you haven't tested these, I'll help if you want.

These tests {sh,c}ould be emulated on another target instead of the
AVR.  Only those marginal cases need testing where a `domain rollover'
in integer numbers could happen (e. g. a large unsigned integer
becoming interpreted as a negative integer, or vice versa).  For the
qsort fix, it should be possible to theroretically analyze the
consequences of the patch.  For the strto* functions, see above, i'd
prefer to reimplement them using the proper data types anyway.

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

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