From: H.G. Muller Date: Sat, 14 Apr 2012 07:11:22 +0000 (+0200) Subject: Fix some compile errors / warnings X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=f8c35eb754cb56fb821bb45e87fd7a27e9ccb594 Fix some compile errors / warnings --- diff --git a/dialogs.c b/dialogs.c index 726574c..93e817a 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1844,7 +1844,7 @@ PMSelect (int n) else EditPositionMenuEvent(pieceMenuTranslation[n - W_MENUW][values[n]], pmFromX, pmFromY); } -int +static void CCB (int n) { shiftKey = (ShiftKeys() & 3) != 0; @@ -2281,7 +2281,7 @@ DirSelProc (int n, int sel) } } -FILE * +void Browse (DialogClass dlg, char *label, char *proposed, char *ext, Boolean pathFlag, char *mode, char **name, FILE **fp) { int j=0; @@ -2295,8 +2295,7 @@ Browse (DialogClass dlg, char *label, char *proposed, char *ext, Boolean pathFla browseOptions[6].textValue = (char*) (pathFlag ? NULL : &FileSelProc); // disable file listbox during path browsing ListDir(pathFlag); currentCps = NULL; - if(GenericPopUp(browseOptions, label, BrowserDlg, dlg, MODAL, 0)) { - } + GenericPopUp(browseOptions, label, BrowserDlg, dlg, MODAL, 0); SetWidgetLabel(&browseOptions[9], FileTypes[j]); } diff --git a/dialogs.h b/dialogs.h index 63690f3..746ad5a 100644 --- a/dialogs.h +++ b/dialogs.h @@ -158,7 +158,7 @@ int ReadScroll P((Option *opt, float *top, float *bottom)); void SetScroll P((Option *opt, float f)); void AddHandler P((Option *opt, int nr)); void SendText P((int n)); -FILE *Browse P((DialogClass dlg, char *label, char *proposed, char *ext, +void Browse P((DialogClass dlg, char *label, char *proposed, char *ext, Boolean pathFlag, char *mode, char **name, FILE **fp)); void InitDrawingParams P(()); // in xboard.c diff --git a/ngamelist.c b/ngamelist.c index 3c0ed89..ae5bf12 100644 --- a/ngamelist.c +++ b/ngamelist.c @@ -287,11 +287,11 @@ GameListClicks (int direction) { int index; - if (glc == NULL || listLength == 0) return 0; + if (glc == NULL || listLength == 0) return 1; if(direction == 100) { FocusOnWidget(&gamesOptions[0], GameListDlg); return 1; } index = SelectedListBoxItem(&gamesOptions[0]); - if (index < 0) return; + if (index < 0) return 1; if(page && (index == 0 && direction < 1 || direction == -4)) { page -= 1000; if(page < 0) page = 0; // safety @@ -310,7 +310,7 @@ GameListClicks (int direction) index += direction; if(direction < -1) index = 0; if(direction > 1) index = listEnd-1; - if(index < 0 || index >= listEnd) return; + if(index < 0 || index >= listEnd) return 1; HighlightWithScroll(&gamesOptions[0], index, listEnd); if(!doLoad) return 1; }