From bc293a1d8f54cbf3618dc9979dba03328f6007d6 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Wed, 12 Feb 2025 03:14:45 +0100 Subject: [PATCH] fix some warnings (-Wdeprecated-non-prototype, -Wparentheses-equality) --- src/callback.c | 2 +- src/eval_expr.y | 2 +- src/scheduler.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/callback.c b/src/callback.c index 25884c4a..814b79ba 100644 --- a/src/callback.c +++ b/src/callback.c @@ -332,7 +332,7 @@ void backannotate_at_cursor_b_pos(xRect *r, Graph_ctx *gr) cnt = 0; } if(xx >= start && xx <= end) { - if((dataset == sweepvar_wrap)) { + if(dataset == sweepvar_wrap) { dbg(1, "xx=%g cursor2=%g first=%d last=%d start=%g end=%g p=%d wrap=%d sweepvar_wrap=%d ofs=%d\n", xx, cursor2, first, last, start, end, p, wrap, sweepvar_wrap, ofs); if(first == -1) first = p; diff --git a/src/eval_expr.y b/src/eval_expr.y index cb6a3a85..078ffa3b 100644 --- a/src/eval_expr.y +++ b/src/eval_expr.y @@ -16,7 +16,7 @@ static int dbglev = 1; struct symrec { char *name; /* name of symbol */ - double (*fnctptr)(); /* value of a FNCT */ + double (*fnctptr)(double); /* value of a FNCT */ struct symrec *next; /* link field */ }; diff --git a/src/scheduler.c b/src/scheduler.c index b5611a46..f16988b1 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -2158,7 +2158,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(argc > 2 ) { what = atoi(argv[2]); } - if((xctx->semaphore == 0)) go_back(what); + if(xctx->semaphore == 0) go_back(what); Tcl_ResetResult(interp); } @@ -3356,7 +3356,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg "-message {Please Set netlisting mode (Options menu)}"); tclsetboolvar("keep_symbols", save_keep); - if( (erc == 0) ) { + if(erc == 0) { my_strncpy(xctx->netlist_name, "", S(xctx->netlist_name)); } }