From: Arun Persaud Date: Tue, 8 Sep 2009 05:04:39 +0000 (-0700) Subject: fixed a few more small bugs reported by Stanislav Brabec X-Git-Tag: v4.4.1.20091019~90 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d5006ae60cce20324c3aaabbc73e0286c31d60c2;p=xboard.git fixed a few more small bugs reported by Stanislav Brabec - A function uses a 'return;' statement, but has actually a value to return, like an integer ('return 42;') or similar: xboard voidreturn xengineoutput.c:766, 782 - Program returns random data in a function at xengineoutput.c:602 - With a new toolchain, AM_LDFLAGS cannot contain libraries. Linker ignores them. Fix is attached. - ToDo: Convenient name in most projects is TODO (autotools package it automatically). --- diff --git a/Makefile.am b/Makefile.am index d26caf6..4c64651 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,6 +25,7 @@ xboard_SOURCES = backend.c backend.h backendz.h \ xhistory.c xhistory.h \ xoptions.c \ $(ZPY) +xboard_LDADD = -lm @X_PRE_LIBS@ @XAW_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ EXTRA_DIST = pixmaps bitmaps shogibitmaps \ xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man @@ -32,7 +33,6 @@ EXTRA_DIST = pixmaps bitmaps shogibitmaps \ DISTCLEANFILES = stamp-h AM_CPPFLAGS=-DINFODIR='"$(infodir)"' @X_CFLAGS@ -AM_LDFLAGS= -lm @X_PRE_LIBS@ @XAW_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ info_TEXINFOS = xboard.texi xboard_TEXINFOS = copyright.texi diff --git a/ToDo b/TODO similarity index 100% rename from ToDo rename to TODO diff --git a/xengineoutput.c b/xengineoutput.c index 54c8859..6c640ea 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -188,9 +188,9 @@ typedef struct { int an_move_count; } EngineOutputData; -static int VerifyDisplayMode(); +static void VerifyDisplayMode(); static void UpdateControls( EngineOutputData * ed ); -static SetEngineState( int which, int state, char * state_data ); +static void SetEngineState( int which, int state, char * state_data ); void ReadIcon(char *pixData[], int iconNr) { @@ -570,7 +570,7 @@ void EngineOutputPopDown() // back end, due to front-end wrapper for SetWindowText, and new SetIcon arguments -static SetEngineState( int which, int state, char * state_data ) +static void SetEngineState( int which, int state, char * state_data ) { int x_which = 1 - which; @@ -756,7 +756,7 @@ static void SetDisplayMode( int mode ) } // pure back end -int VerifyDisplayMode() +void VerifyDisplayMode() { int mode;