From 41070eeca8bfc3b185f467946d856c7ca6774bda Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 24 Feb 2005 00:57:33 +0000 Subject: [PATCH] fix "function declaration isn't a prototype" warnings from -Wstrict-prototypes mostly by using (void) instead of () for functions with empty parameter lists. --- cmd/dot/dot.c | 2 +- cmd/dot/dotneato.c | 2 +- cmd/dot/dotneato.h | 2 +- cmd/gvpr/compile.c | 2 +- cmd/gvpr/gprstate.h | 2 +- cmd/lefty/ws/x11/libfilereq/Draw.c | 4 +-- cmd/lefty/ws/x11/libfilereq/Path.c | 4 +-- cmd/lefty/ws/x11/libfilereq/SFinternal.h | 2 +- cmd/lefty/ws/x11/libfilereq/SelFile.c | 37 +++++------------------- cmd/tools/ccomps.c | 2 +- cmd/tools/cvtgxl.c | 6 ++-- cmd/tools/gxl2dot.c | 2 +- 12 files changed, 23 insertions(+), 44 deletions(-) diff --git a/cmd/dot/dot.c b/cmd/dot/dot.c index 3b0626abe..d3226a38d 100644 --- a/cmd/dot/dot.c +++ b/cmd/dot/dot.c @@ -68,7 +68,7 @@ static void fperr(int s) exit(1); } -static void fpinit() +static void fpinit(void) { #if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT) int exc = 0; diff --git a/cmd/dot/dotneato.c b/cmd/dot/dotneato.c index 87b865fd3..ea1c210fa 100644 --- a/cmd/dot/dotneato.c +++ b/cmd/dot/dotneato.c @@ -22,7 +22,7 @@ char *Info[] = { BUILDDATE /* Build Date */ }; -GVC_t *gvContext() +GVC_t *gvContext(void) { return gvNEWcontext(Info, ""); } diff --git a/cmd/dot/dotneato.h b/cmd/dot/dotneato.h index 161d22704..2a68be57b 100644 --- a/cmd/dot/dotneato.h +++ b/cmd/dot/dotneato.h @@ -27,7 +27,7 @@ extern "C" { #endif - extern GVC_t *gvContext(); +extern GVC_t *gvContext(void); #ifdef __cplusplus } diff --git a/cmd/gvpr/compile.c b/cmd/gvpr/compile.c index 4cc69f606..de501d0eb 100644 --- a/cmd/gvpr/compile.c +++ b/cmd/gvpr/compile.c @@ -1707,7 +1707,7 @@ int usesGraph(comp_prog * p) return (walksGraph(p) || p->begg_stmt || p->endg_stmt); } -void ptchk() +void ptchk(void) { int i; for (i = 0; i <= LAST_M; i++) diff --git a/cmd/gvpr/gprstate.h b/cmd/gvpr/gprstate.h index 27dae0b1d..6c7133bbe 100644 --- a/cmd/gvpr/gprstate.h +++ b/cmd/gvpr/gprstate.h @@ -51,7 +51,7 @@ extern "C" { char **argv; } gpr_info; - extern Gpr_t *openGPRState(); + extern Gpr_t *openGPRState(void); extern void initGPRState(Gpr_t *, Vmalloc_t *, gpr_info *); extern int validTVT(int); diff --git a/cmd/lefty/ws/x11/libfilereq/Draw.c b/cmd/lefty/ws/x11/libfilereq/Draw.c index a65181520..182b78921 100644 --- a/cmd/lefty/ws/x11/libfilereq/Draw.c +++ b/cmd/lefty/ws/x11/libfilereq/Draw.c @@ -392,7 +392,7 @@ static void SFinvertEntry(int n) SFentryWidth, SFentryHeight); } -static unsigned long SFscrollTimerInterval() +static unsigned long SFscrollTimerInterval(void) { static int maxVal = 200; static int varyDist = 50; @@ -783,7 +783,7 @@ void SFpathAreaSelectedCallback(Widget w, XtPointer client_data, int pnew) SFpathSliderMovedCallback(w, (XtPointer) NULL, &f); } -Boolean SFworkProc() +Boolean SFworkProc(void) { register SFDir *dir; register SFEntry *entry; diff --git a/cmd/lefty/ws/x11/libfilereq/Path.c b/cmd/lefty/ws/x11/libfilereq/Path.c index 7a2188630..0e18917ef 100644 --- a/cmd/lefty/ws/x11/libfilereq/Path.c +++ b/cmd/lefty/ws/x11/libfilereq/Path.c @@ -365,7 +365,7 @@ static int SFfindFile(SFDir *dir, char *str) return 0; } -static void SFunselect() +static void SFunselect(void) { SFDir *dir; @@ -383,7 +383,7 @@ static int SFcompareLogins(const void *vp, const void *vq) return strcmp(p->name, q->name); } -static void SFgetHomeDirs() +static void SFgetHomeDirs(void) { struct passwd *pw; int alloc; diff --git a/cmd/lefty/ws/x11/libfilereq/SFinternal.h b/cmd/lefty/ws/x11/libfilereq/SFinternal.h index d3e2420ca..69e9a0a95 100644 --- a/cmd/lefty/ws/x11/libfilereq/SFinternal.h +++ b/cmd/lefty/ws/x11/libfilereq/SFinternal.h @@ -142,7 +142,7 @@ extern "C" { extern int SFworkProcAdded; extern XtWorkProcId SFworkProcId; - extern Boolean SFworkProc(); + extern Boolean SFworkProc(void); extern XtAppContext SFapp; diff --git a/cmd/lefty/ws/x11/libfilereq/SelFile.c b/cmd/lefty/ws/x11/libfilereq/SelFile.c index 9720f44be..491145bb1 100644 --- a/cmd/lefty/ws/x11/libfilereq/SelFile.c +++ b/cmd/lefty/ws/x11/libfilereq/SelFile.c @@ -172,11 +172,7 @@ static char *oneLineTextEditTranslations = "\ "; /* ARGSUSED */ -static void SFexposeList(w, n, event, cont) -Widget w; -XtPointer n; -XEvent *event; -Boolean *cont; +static void SFexposeList(Widget w, XtPointer n, XEvent *event, Boolean *cont) { if ((event->type == NoExpose) || event->xexpose.count) { return; @@ -186,11 +182,7 @@ Boolean *cont; } /* ARGSUSED */ -static void SFmodVerifyCallback(w, client_data, event, cont) -Widget w; -XtPointer client_data; -XEvent *event; -Boolean *cont; +static void SFmodVerifyCallback(Widget w, XtPointer client_data, XEvent *event, Boolean *cont) { char buf[2]; @@ -204,9 +196,7 @@ Boolean *cont; } /* ARGSUSED */ -static void SFokCallback(w, cl, cd) -Widget w; -XtPointer cl, cd; +static void SFokCallback(Widget w, XtPointer cl, XtPointer cd) { SFstatus = SEL_FILE_OK; } @@ -217,9 +207,7 @@ static XtCallbackRec SFokSelect[] = { }; /* ARGSUSED */ -static void SFcancelCallback(w, cl, cd) -Widget w; -XtPointer cl, cd; +static void SFcancelCallback(Widget w, XtPointer cl, XtPointer cd) { SFstatus = SEL_FILE_CANCEL; } @@ -230,11 +218,7 @@ static XtCallbackRec SFcancelSelect[] = { }; /* ARGSUSED */ -static void SFdismissAction(w, event, params, num_params) -Widget w; -XEvent *event; -String *params; -Cardinal *num_params; +static void SFdismissAction(Widget w, XEvent *event, String *params, Cardinal *num_params) { if (event->type == ClientMessage && event->xclient.data.l[0] != SFwmDeleteWindow) @@ -251,11 +235,7 @@ static XtActionsRec actions[] = { {"SelFileDismiss", SFdismissAction}, }; -static void SFcreateWidgets(toplevel, prompt, ok, cancel) -Widget toplevel; -char *prompt; -char *ok; -char *cancel; +static void SFcreateWidgets(Widget toplevel, char *prompt, char *ok, char *cancel) { Cardinal i; long n; @@ -658,8 +638,7 @@ char *cancel; } /* position widget under the cursor */ -void SFpositionWidget(w) -Widget w; +void SFpositionWidget(Widget w) { Arg args[3]; Cardinal num_args; @@ -776,7 +755,7 @@ static char *SFgetText() } #endif -static void SFprepareToReturn() +static void SFprepareToReturn(void) { SFstatus = SEL_FILE_NULL; XtRemoveGrab(selFile); diff --git a/cmd/tools/ccomps.c b/cmd/tools/ccomps.c index 4a7d833a0..f80157f61 100644 --- a/cmd/tools/ccomps.c +++ b/cmd/tools/ccomps.c @@ -210,7 +210,7 @@ static int nodeInduce(Agraph_t * g, Agraph_t * eg) return e_cnt; } -static char *getName() +static char *getName(void) { char *name; static char *buf = 0; diff --git a/cmd/tools/cvtgxl.c b/cmd/tools/cvtgxl.c index 65a7b361e..592a6089c 100644 --- a/cmd/tools/cvtgxl.c +++ b/cmd/tools/cvtgxl.c @@ -37,7 +37,7 @@ static char **Files; static mode act = Unset; #ifdef HAVE_LIBEXPAT -static FILE *getFile() +static FILE *getFile(void) { FILE *rv = NULL; static FILE *savef = NULL; @@ -105,7 +105,7 @@ static char *cmdName(char *path) return sp; } -static void checkInput() +static void checkInput(void) { char *ep; @@ -119,7 +119,7 @@ static void checkInput() act = ToDot; } -static void setAction() +static void setAction(void) { switch (*CmdName) { case 'd': diff --git a/cmd/tools/gxl2dot.c b/cmd/tools/gxl2dot.c index 8558d7598..194649132 100644 --- a/cmd/tools/gxl2dot.c +++ b/cmd/tools/gxl2dot.c @@ -150,7 +150,7 @@ static Dtdisc_t nameDisc = { NIL(Dtevent_f) }; -static userdata_t *genUserdata() +static userdata_t *genUserdata(void) { userdata_t *user = NEW(userdata_t); agxbinit(&(user->xml_attr_name), NAMEBUF, 0); -- 2.40.0