gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Cast to unsigned


From: Arend Bayer
Subject: Re: [gnugo-devel] Cast to unsigned
Date: Thu, 7 Aug 2003 19:50:48 +0200 (CEST)

On Thu, 7 Aug 2003, Inge Wallin wrote:

> I am in the middle of fixing all the issues that Arend brought up.  When I
> compile the current CVS version I get warnings in cache.c.
>
> Arend, you (I think) introduced casts to unsigned in some comparisons in
> cache.c.  One of them is in tt_get() and looks like this:
>
>   if ((unsigned) remaining_depth <= hn_get_remaining_depth(*node)) {
>     if (result)
>       *result = hn_get_result1(*node);
>     return 2;
>   }
>
> These give warnings about comparison between singed and unsigned, and before I
> try to fix them, I think that I must understand the reason for the cast.  Can
> you elaborate?

These were to avoid compiler warnings when .data in the hash nodes
was still unsigned (as it has to be).

Arend






reply via email to

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