diff --git a/src/frontend/help/readhelp.c b/src/frontend/help/readhelp.c index e9f7dbdc5..ea7a262e0 100644 --- a/src/frontend/help/readhelp.c +++ b/src/frontend/help/readhelp.c @@ -62,7 +62,7 @@ hlp_read(fplace *place) wordlist *wl, *end = NULL; int i, fchanges; char *s; - bool mof; + bool mof = FALSE; if (!place) return 0; diff --git a/src/frontend/plotting/clip.c b/src/frontend/plotting/clip.c index d7da33f89..6e90e6106 100644 --- a/src/frontend/plotting/clip.c +++ b/src/frontend/plotting/clip.c @@ -48,7 +48,8 @@ clip_line(int *pX1, int *pY1, int *pX2, int *pY2, int l, int b, int r, int t) int y1 = *pY1; int x2 = *pX2; int y2 = *pY2; - int x,y,c,c1,c2; + int x = 0, y = 0; + int c,c1,c2; CODE(x1,y1,c1) CODE(x2,y2,c2) diff --git a/src/frontend/plotting/graf.c b/src/frontend/plotting/graf.c index 5258a889e..2513d2779 100644 --- a/src/frontend/plotting/graf.c +++ b/src/frontend/plotting/graf.c @@ -23,7 +23,7 @@ Author: 1988 Jeffrey M. Hsu #include "ftedev.h" #include #include - +#include "../terminal.h" #include "graf.h" diff --git a/src/frontend/plotting/grid.c b/src/frontend/plotting/grid.c index c25517bf4..eaf9aa7ec 100644 --- a/src/frontend/plotting/grid.c +++ b/src/frontend/plotting/grid.c @@ -229,7 +229,7 @@ lingrid(GRAPH *graph, double lo, double hi, double delta, int type, Axis axis) int mag, mag2, mag3; double hmt, lmt, dst; int nsp; - double tenpowmag, tenpowmag2, step, spacing; + double tenpowmag = 0.0, tenpowmag2, step, spacing; bool onedec = FALSE; int margin; int max; @@ -1111,7 +1111,7 @@ drawsmithgrid(GRAPH *graph) { double mx, my, tenpowmag, d, dphi[CMAX], minrad, maxrad, rnorm[CMAX]; double pixperunit; - int mag, i, j, k; + int mag, i = 0, j = 0, k; double ir[CMAX], rr[CMAX], ki[CMAX], kr[CMAX], ks[CMAX]; int xoff, yoff, zheight; int basemag, plen; @@ -1405,7 +1405,7 @@ static double cliparc(double cx, double cy, double rad, double start, double end, int iclipx, int iclipy, int icliprad, int flag) { double clipx, clipy, cliprad; - double sclip, eclip; + double sclip = 0.0, eclip = 0.0; double x, y, tx, ty, dist; double alpha, theta, phi, a1, a2, d, l; bool in; diff --git a/src/frontend/plotting/plotcurv.c b/src/frontend/plotting/plotcurv.c index c50b2a5a2..0883f8c0a 100644 --- a/src/frontend/plotting/plotcurv.c +++ b/src/frontend/plotting/plotcurv.c @@ -33,8 +33,8 @@ ft_graf(struct dvec *v, struct dvec *xs, bool nostart) register int i, j, l; double *scratch, *result, *gridbuf, *mm; register double *xdata, *ydata; - bool rot, increasing; - double dx, dy, lx = 0, ly = 0; + bool rot, increasing = FALSE; + double dx = 0.0, dy = 0.0, lx = 0.0, ly = 0.0; int dir; /* if already started, use saved degree */ diff --git a/src/frontend/plotting/x11.c b/src/frontend/plotting/x11.c index 87b21d985..95613e3ed 100644 --- a/src/frontend/plotting/x11.c +++ b/src/frontend/plotting/x11.c @@ -369,13 +369,13 @@ X11_NewViewport(GRAPH *graph) viewargs, XtNumber(viewargs)); XtAddEventHandler(DEVDEP(graph).view, ButtonPressMask, FALSE, - handlebuttonev, graph); + (XtEventHandler) handlebuttonev, graph); XtAddEventHandler(DEVDEP(graph).view, KeyPressMask, FALSE, - handlekeypressed, graph); + (XtEventHandler) handlekeypressed, graph); XtAddEventHandler(DEVDEP(graph).view, StructureNotifyMask, FALSE, - resize, graph); + (XtEventHandler) resize, graph); XtAddEventHandler(DEVDEP(graph).view, ExposureMask, FALSE, - redraw, graph); + (XtEventHandler) redraw, graph); /* set up button box */ XtSetArg(bboxargs[1], XtNfromHoriz, DEVDEP(graph).view); @@ -388,14 +388,14 @@ X11_NewViewport(GRAPH *graph) DEVDEP(graph).buttons[0] = XtCreateManagedWidget("quit", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 1); - XtAddCallback(DEVDEP(graph).buttons[0], XtNcallback, killwin, graph); + XtAddCallback(DEVDEP(graph).buttons[0], XtNcallback, (XtCallbackProc) killwin, graph); XtSetArg(buttonargs[0], XtNlabel, "hardcopy"); XtSetArg(bboxargs[1], XtNfromVert, DEVDEP(graph).buttons[0]); DEVDEP(graph).buttons[1] = XtCreateManagedWidget("hardcopy", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 1); - XtAddCallback(DEVDEP(graph).buttons[1], XtNcallback, hardcopy, graph); + XtAddCallback(DEVDEP(graph).buttons[1], XtNcallback, (XtCallbackProc) hardcopy, graph); /* set up fonts */ if (!cp_getvar("font", VT_STRING, fontname)) { diff --git a/src/frontend/variable.c b/src/frontend/variable.c index 3304e9f57..e6f476be0 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -455,7 +455,7 @@ cp_remvar(char *varname) /* Determine the value of a variable. Fail if the variable is unset, * and if the type doesn't match, try and make it work... */ bool -cp_getvar(char *name, int type, char *retval) +cp_getvar(char *name, int type, void *retval) { struct variable *v; diff --git a/src/frontend/variable.h b/src/frontend/variable.h index 98706bda2..161d6b90e 100644 --- a/src/frontend/variable.h +++ b/src/frontend/variable.h @@ -48,7 +48,7 @@ wordlist * cp_varwl(struct variable *var); void cp_vset(char *varname, char type, char *value); struct variable * cp_setparse(wordlist *wl); void cp_remvar(char *varname); -bool cp_getvar(char *name, int type, char *retval); +bool cp_getvar(char *name, int type, void *retval); wordlist * cp_variablesubst(wordlist *wlist); wordlist * vareval(char *string); void cp_vprint(void); diff --git a/src/include/cpextern.h b/src/include/cpextern.h index 8d676b257..daac18a79 100644 --- a/src/include/cpextern.h +++ b/src/include/cpextern.h @@ -167,7 +167,7 @@ extern void cp_vprint(void); extern void com_set(wordlist *wl); extern void com_unset(wordlist *wl); extern void com_shift(wordlist *wl); -extern bool cp_getvar(char *name, int type, char *retval); +extern bool cp_getvar(char *name, int type, void *retval); /* cpinterface.c etc -- stuff CP needs from FTE */ diff --git a/src/maths/ni/nipzmeth.c b/src/maths/ni/nipzmeth.c index 9c7f47566..d265947bb 100644 --- a/src/maths/ni/nipzmeth.c +++ b/src/maths/ni/nipzmeth.c @@ -19,6 +19,8 @@ static unsigned int Debug = 0; */ #endif +extern void zaddeq(double *a, int *amag, double x, int xmag, double y, int ymag); + extern int CKTpzTrapped; double NIpzK; int NIpzK_mag; @@ -215,7 +217,7 @@ NIpzSym2(PZtrial **set, PZtrial *new) int tmag; int error; int disc_mag; - int new_mag; + int new_mag = 0; error = OK; diff --git a/src/maths/sparse/spfactor.c b/src/maths/sparse/spfactor.c index 0bcf6a7ad..195181583 100644 --- a/src/maths/sparse/spfactor.c +++ b/src/maths/sparse/spfactor.c @@ -1709,9 +1709,13 @@ int Step; long MinMarkowitzProduct, *pMarkowitzProduct; int I; ElementPtr pDiag; - int NumberOfTies, Size = Matrix->Size; + int NumberOfTies = 0; + int Size = Matrix->Size; + ElementPtr ChosenPivot; - RealNumber Magnitude, Ratio, RatioOfAccepted, LargestInCol; + RealNumber Magnitude, Ratio; + RealNumber RatioOfAccepted = 0; + RealNumber LargestInCol; RealNumber FindBiggestInColExclude(); /* Begin `SearchDiagonal'. */ @@ -1838,10 +1842,13 @@ int Step; { int I, Size = Matrix->Size; ElementPtr pElement; - int NumberOfTies; + int NumberOfTies = 0; long Product, MinMarkowitzProduct; - ElementPtr ChosenPivot, pLargestElement; - RealNumber Magnitude, LargestElementMag, Ratio, RatioOfAccepted, LargestInCol; + ElementPtr ChosenPivot; + ElementPtr pLargestElement = NULL; + RealNumber Magnitude, LargestElementMag, Ratio; + RealNumber RatioOfAccepted = 0; + RealNumber LargestInCol; RealNumber FindLargestInCol(); /* Begin `SearchEntireMatrix'. */ diff --git a/src/maths/sparse/spoutput.c b/src/maths/sparse/spoutput.c index 9511c72fd..51ba12973 100644 --- a/src/maths/sparse/spoutput.c +++ b/src/maths/sparse/spoutput.c @@ -137,7 +137,9 @@ spPrint(void *eMatrix, int PrintReordered, int Data, int Header) int J = 0; int I, Row, Col, Size, Top; int StartCol = 1, StopCol, Columns, ElementCount = 0; - double Magnitude, SmallestDiag, SmallestElement; + double Magnitude; + double SmallestDiag = 0; + double SmallestElement = 0; double LargestElement = 0.0, LargestDiag = 0.0; ElementPtr pElement, *pImagElements; int *PrintOrdToIntRowMap, *PrintOrdToIntColMap; diff --git a/src/nghelp.c b/src/nghelp.c index 0e9a1d3fe..1fdc3b195 100644 --- a/src/nghelp.c +++ b/src/nghelp.c @@ -102,7 +102,7 @@ cp_printword(s) */ bool -cp_getvar(char *n, int t, char *r) +cp_getvar(char *n, int t, void *r) { return (FALSE); }