From: Arun Persaud Date: Mon, 22 Feb 2010 03:45:58 +0000 (-0800) Subject: fixed compiler warning for file-browser code X-Git-Tag: master-20100221~1 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=18c9024957df2892adb21cd851cb7a27b9502d54;p=xboard.git fixed compiler warning for file-browser code missing "void"s in the function declaration and missing returns showed up when trying to build on the opensuse build server. fixed now. --- diff --git a/filebrowser/draw.c b/filebrowser/draw.c index 47efa17..a5b85f5 100644 --- a/filebrowser/draw.c +++ b/filebrowser/draw.c @@ -59,6 +59,7 @@ static int SFcurrentListY; static XtIntervalId SFscrollTimerId; +void SFinitFont() { TextData *data; @@ -84,8 +85,10 @@ SFinitFont() SFcharWidth = (SFfont->max_bounds.width + SFfont->min_bounds.width) / 2; SFcharAscent = SFfont->max_bounds.ascent; SFcharHeight = SFcharAscent + SFfont->max_bounds.descent; + return; } +void SFcreateGC() { XGCValues gcValues; @@ -149,8 +152,10 @@ SFcreateGC() 1, Unsorted ); + return; } +void SFclearList(n, doScroll) int n; int doScroll; @@ -191,9 +196,10 @@ SFclearList(n, doScroll) (float) 1.0); } } + return; } -static +static void SFdeleteEntry(dir, entry) SFDir *dir; SFEntry *entry; @@ -242,15 +248,17 @@ SFdeleteEntry(dir, entry) (float) (((double) ((dir->nEntries < SFlistSize) ? dir->nEntries : SFlistSize)) / dir->nEntries) ); + return; } -static +static void SFwriteStatChar(name, last, statBuf) char *name; int last; struct stat *statBuf; { name[last] = SFstatChar(statBuf); + return; } static int @@ -320,7 +328,7 @@ SFstatAndCheck(dir, entry) return 0; } -static +static void SFdrawStrings(w, dir, from, to) register Window w; register SFDir *dir; @@ -395,8 +403,10 @@ SFdrawStrings(w, dir, from, to) ); } } + return; } +void SFdrawList(n, doScroll) int n; int doScroll; @@ -420,8 +430,10 @@ SFdrawList(n, doScroll) ); SFdrawStrings(w, dir, 0, SFlistSize - 1); } + return; } +void SFdrawLists(doScroll) int doScroll; { @@ -430,9 +442,10 @@ SFdrawLists(doScroll) for (i = 0; i < NR; i++) { SFdrawList(i, doScroll); } + return; } -static +static void SFinvertEntry(n) register int n; { @@ -445,6 +458,7 @@ SFinvertEntry(n) SFentryWidth, SFentryHeight ); + return; } static unsigned long @@ -620,6 +634,7 @@ SFmotionList(w, n, event) SFinvertEntry(n); } } + return; } /* ARGSUSED */ diff --git a/filebrowser/path.c b/filebrowser/path.c index 6379e79..4e13ea3 100644 --- a/filebrowser/path.c +++ b/filebrowser/path.c @@ -82,7 +82,7 @@ SFchdir(path) return result; } -static +static void SFfree(i) int i; { @@ -103,17 +103,19 @@ SFfree(i) XtFree(dir->dir); dir->dir = NULL; + return; } -static +static void SFstrdup(s1, s2) char **s1; char *s2; { *s1 = strcpy(XtMalloc((unsigned) (strlen(s2) + 1)), s2); + return; } -static +static void SFunreadableDir(dir) SFDir *dir; { @@ -125,6 +127,7 @@ SFunreadableDir(dir) dir->entries[0].shown = dir->entries[0].real; dir->nEntries = 1; dir->nChars = strlen(cannotOpen); + return; } #ifdef SEL_FILE_IGNORE_CASE @@ -172,7 +175,7 @@ SFstrncmp(p, q, n) } #endif /* def SEL_FILE_IGNORE_CASE */ -static +static void SFreplaceText(dir, str) SFDir *dir; char *str; @@ -193,6 +196,7 @@ SFreplaceText(dir, str) } SFtextChanged(); + return; } static void @@ -356,7 +360,7 @@ SFfindFile(dir, str) return 0; } -static +static void SFunselect() { SFDir *dir; @@ -367,6 +371,7 @@ SFunselect() } dir->beginSelection = -1; dir->endSelection = -1; + return; } static int @@ -376,7 +381,7 @@ SFcompareLogins(p, q) return strcmp(p->name, q->name); } -static +static void SFgetHomeDirs() { struct passwd *pw; @@ -452,6 +457,7 @@ SFgetHomeDirs() for (i--; i >= 0; i--) { (void) strcat(entries[i].real, "/"); } + return; } static int @@ -483,6 +489,7 @@ SFfindHomeDir(begin, end) return 0; } +void SFupdatePath() { static int alloc; @@ -670,8 +677,10 @@ SFupdatePath() } } } + return; } +void SFsetText(path) char *path; { @@ -684,6 +693,8 @@ SFsetText(path) XawTextReplace(selFileField, 0, strlen(SFtextBuffer), &text); XawTextSetInsertionPoint(selFileField, strlen(SFtextBuffer)); + + return; } /* ARGSUSED */ diff --git a/filebrowser/selfile.c b/filebrowser/selfile.c index 4298e30..c0a2ce2 100644 --- a/filebrowser/selfile.c +++ b/filebrowser/selfile.c @@ -588,6 +588,7 @@ SFopenFile(name, mode, prompt, failed) return fp; } +void SFtextChanged() { @@ -608,6 +609,7 @@ SFtextChanged() } SFupdatePath(); + return; } static char * @@ -617,7 +619,7 @@ SFgetText() SFtextBuffer); } -static +static void SFprepareToReturn() { SFstatus = SEL_FILE_NULL; @@ -630,6 +632,7 @@ SFprepareToReturn() "XsraSelFile: can't return to current directory" ); } + return; } FILE *