gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] compiler warnings


From: Gunnar Farneback
Subject: Re: [gnugo-devel] compiler warnings
Date: Thu, 21 Nov 2002 00:30:45 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Evan wrote:
> This patch fixes compiler warnings in oracle.c and play_gmp.c.
> [...]
> --- engine/gnugo.h    19 Nov 2002 16:32:35 -0000      1.79
> +++ engine/gnugo.h    20 Nov 2002 22:59:12 -0000
> @@ -511,6 +511,10 @@
>  void decide_surrounded(int pos);
>  void decide_oracle(Gameinfo *gameinfo, char *infilename, char *untilstring);
> 
> +/*oracle.c*/
> +void dismiss_oracle(void);
> +void oracle_clear_board(int boardsize);
> +

If added to gnugo.h these should be removed from liberty.h.
Duplicating the declarations is no good.

> -  to_gnugo_stream = (int) fdopen(pfd_a[1], "w");
> +  to_gnugo_stream = (FILE *) fdopen(pfd_a[1], "w");
>    /* Attach pipe b to from_gnugo_stream */
> -  from_gnugo_stream = (int) fdopen(pfd_b[0], "r");
> +  from_gnugo_stream = (FILE *) fdopen(pfd_b[0], "r");

I have no idea why these were cast to int before, but fdopen() already
returns a pointer to a FILE, so there's no need to cast at all.

/Gunnar




reply via email to

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