Compiler Warnings

Christos Zoulas christos at
Wed Apr 13 16:14:57 UTC 2011

On Apr 13,  9:38am, olsona at ("Olson, Arthur David (NIH/NCI) [E]") wrote:
-- Subject: RE: Compiler Warnings

| Here’s an "increment_overflow" replacement that doesn't get any complaints from gcc.
| How can it be portably simplified?

I think that Paul Eggert posted a simpler one:

static int
increment_overflow(int *number, int delta)
        int     number0;

        number0 = *number; 
        if (delta < 0 ? number0 < INT_MIN - delta : INT_MAX - delta < number0)
                  return 1;
        *number += delta;
        return 0;

Any updates putting in the per timezone functionality in? I've committed
it to the NetBSD codebase and seems to work fine...


More information about the tz mailing list