From: H.G. Muller Date: Wed, 4 May 2011 08:59:43 +0000 (+0200) Subject: Silence more rpm warnings X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=498295a2dc77a1335d415a6d25b4bb76319ff815;p=xboard.git Silence more rpm warnings --- diff --git a/backend.c b/backend.c index f560b2f..6c68aa5 100644 --- a/backend.c +++ b/backend.c @@ -325,7 +325,7 @@ safeStrCpy( char *dst, const char *src, size_t count ) { dst[ count-1 ] = '\0'; // make sure incomplete copy still null-terminated if(appData.debugMode) - fprintf(debugFP, "safeStrCpy: copying %s into %s didn't work, not enough space %d\n",src,dst,count); + fprintf(debugFP, "safeStrCpy: copying %s into %s didn't work, not enough space %d\n",src,dst, (int)count); } return dst; diff --git a/filebrowser/selfile.c b/filebrowser/selfile.c index 5a4ceb4..3a597b0 100644 --- a/filebrowser/selfile.c +++ b/filebrowser/selfile.c @@ -785,8 +785,8 @@ XsraSelFile(toplevel, prompt, ok, cancel, failed, XtSetArg(arglist[i], XtNstring, filter); i++; XtSetValues(filterField, arglist, i); - safeStrCpy(SFfilterBuffer, filter, MAXPATHLEN); - safeStrCpy(SFlastPath, SFtextBuffer, MAXPATHLEN); // remember for cancel + strncpy(SFfilterBuffer, filter, MAXPATHLEN-1); + strncpy(SFlastPath, SFtextBuffer, MAXPATHLEN-1); // remember for cancel SFpositionWidget(selFile); XtMapWidget(selFile); diff --git a/moves.c b/moves.c index fd05e38..f930231 100644 --- a/moves.c +++ b/moves.c @@ -196,7 +196,7 @@ void GenPseudoLegal(board, flags, callback, closure) if(gameInfo.variant == VariantShogi) piece = (ChessSquare) ( SHOGI piece ); - switch (piece) { + switch ((int)piece) { /* case EmptySquare: [HGM] this is nonsense, and conflicts with Shogi cases */ default: /* can't happen ([HGM] except for faries...) */ @@ -1703,11 +1703,11 @@ typedef struct { int preyStackPointer, chaseStackPointer; struct { -char rf, ff, rt, ft; +unsigned char rf, ff, rt, ft; } chaseStack[100]; struct { -char rank, file; +unsigned char rank, file; } preyStack[100]; diff --git a/xboard.c b/xboard.c index 233e3cd..ac937d6 100644 --- a/xboard.c +++ b/xboard.c @@ -3986,7 +3986,7 @@ void PieceMenuPopup(w, event, params, num_params) String *params; Cardinal *num_params; { - String whichMenu; int menuNr; + String whichMenu; int menuNr = -2; shiftKey = strcmp(params[0], "menuW"); // used to indicate black if (event->type == ButtonRelease) menuNr = RightClick(Release, event->xbutton.x, event->xbutton.y, &pmFromX, &pmFromY); diff --git a/xboard.h b/xboard.h index 0263df6..14224e4 100644 --- a/xboard.h +++ b/xboard.h @@ -119,7 +119,7 @@ typedef struct { typedef int (*FileProc) P((FILE *f, int n, char *title)); int PopDown P((int n)); -int InpuBoxPopUp P((void)); +void InputBoxPopup P((void)); void CatchDeleteWindow(Widget w, String procname); void PlaySound P((char *name)); void ParseIcsTextColors P((void)); diff --git a/xgamelist.c b/xgamelist.c index 4f86718..46200c5 100644 --- a/xgamelist.c +++ b/xgamelist.c @@ -408,12 +408,16 @@ GameListCallback(w, client_data, call_data) if(GameListPrepare()) GameListReplace(); // crashes on empty list... return; } +#if 0 index = atoi(glc->strings[index])-1; // [HGM] filter: read true index from sequence nr of line if (cmailMsgLoaded) { CmailLoadGame(glc->fp, index + 1, glc->filename, True); } else { LoadGame(glc->fp, index + 1, glc->filename, True); } +#else + printf("This code should have been unreachable. Please report bug!\n"); +#endif } void