gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] GNU Go 3.7.13


From: Wietze Brandsma
Subject: Re: [gnugo-devel] GNU Go 3.7.13
Date: Fri, 26 Dec 2008 21:51:50 +0100
User-agent: Thunderbird 2.0.0.18 (X11/20081125)

Daniel Bump wrote:
C:\prj\vc\gnugo\engine\owl.c(5151) : warning C4761: integral size mismatch in argument; conversion supplied

Line 5151 in owl.c is in the function owl_test_cuts:

          mark_string(cuts[k], component2, c_id);

GCC doesn't issue any warning.
I have dug a little deeper into the source code.

In other parts of owl.c and in persistent.c the last argument of mark_string() is cast to signed char.
Doing that also on these lines helps against these two compiler warnings:
Line 5151:
     mark_string(cuts[k], component2, (signed char) c_id);
Line 5176:
   mark_string(pos, component2, (signed char) closest_component);

C:\prj\vc\gnugo\patterns\mcpat.c(106419) : warning C4049: compiler limit : terminating line number emission

I googled and got this:

http://www.pcreview.co.uk/forums/thread-1428618.php

The warning means that the debugger won't be able to match object
code to source code for line numbers over 65535, since the debug
info only provides a 16-bit space to store line number information. It has no effect on the correctness of the compiled/linked
program at all.
mkmcpat.c prints 8 items per line, changing that to 16 does get rid of this warning:
Line 130 of mkmcpat.c :
     if (k % 8 == 7)
   printf("\n");

Change this to :
     if (k % 16 == 15)
   printf("\n");


The warnings on line 1795 and 1862 in main.c go away when the 'port' argument is cast to unsigned short:
 address.sin_port = htons((unsigned short) port);

It seems that winsock.h for VC6 prototypes it that way.
I do not know whether this typecast should be applied on other platforms.


Last point. I have moved a .h file from the source section to the header section in both the board.dsp and the utils.dsp, see attachment. This is just a cosmetic change.

W.A. Brandsma

Attachment: gnugo_vc6_tidyup.zip
Description: Zip archive


reply via email to

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