gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] 3.5.4: compilation warning and error


From: a . rburgers
Subject: [gnugo-devel] 3.5.4: compilation warning and error
Date: Mon, 02 Feb 2004 14:41:15 +0100

This patch addresses two issues:

1) cc on Tru64 gives warnings of the following type:

cc -DHAVE_CONFIG_H -I. -I. -I.. -I../patterns -I../patterns -I../sgf -I../utils 
 -c `test -f cache.c || echo './'`cache.c
cc: Warning: gnugo.h, line 355: In this declaration, the enum "dragon_status" 
is not defined. (undefenum)
enum dragon_status aftermath_final_status(int color, int pos);

The problem is that enum dragon_status is #defined in liberty.h and some 
prototypes in gnugo.h also require
dragon_status. gnugo.h is #included in liberty.h so this
can be fixed by moving the declaration of dragon_status to gnugo.h

A second issue is that there is a flaw in the logic around
line 2500 in readconnect.c:

  if (num_moves <= 1 || !is_ko(moves[0], color_to_move, NULL))
    distance_limit = distances[0] + 1.5;
  else
    distance_limit = distances[1] + 1.5;

When num_moves == 0, distances[0] is not initialized and
this leads to floating point exceptions on Tru64. Fixed
by returning just before this if statement when num_moves ==0. This case is 
triggered early in owl.tst.

Teun


Attachment: p355-01.txt
Description: Text document


reply via email to

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