1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00
freebsd-ports/cad/jspice3/files/patch-src_lib_fte_options.c
John Marino 643f83a81d Stage cad/jspice3 and unbreak on FreeBSD 10+
It would have been easy just to set this to "USE_GCC=any" to fix it,
but the code had plenty of undefined returns when a type was expected.
Using clang exposed those problems.  Hopefully I defined the missing
return values correctly.
2014-08-18 08:32:20 +00:00

46 lines
1.2 KiB
C

--- src/lib/fte/options.c.orig 2009-01-11 20:27:11.000000000 +0000
+++ src/lib/fte/options.c
@@ -66,7 +66,7 @@ def_fn(_iv_cpdebug)
def_fn(_iv_history)
{
- if (!flag) return;
+ if (!flag) return (US_OK);
if (v->va_type == VT_NUM)
cp_maxhistlength = v->va_num;
else if (v->va_type == VT_REAL)
@@ -930,27 +930,27 @@ struct variable **v1, **v2;
v = va_copy(plot_cur->pl_env);
else
v = NULL;
- if (tv = cp_enqvar(kw_plots)) {
+ if ((tv = cp_enqvar(kw_plots))) {
tv->va_next = v;
v = tv;
}
- if (tv = cp_enqvar(kw_curplot)) {
+ if ((tv = cp_enqvar(kw_curplot))) {
tv->va_next = v;
v = tv;
}
- if (tv = cp_enqvar(kw_curplottitle)) {
+ if ((tv = cp_enqvar(kw_curplottitle))) {
tv->va_next = v;
v = tv;
}
- if (tv = cp_enqvar(kw_curplotname)) {
+ if ((tv = cp_enqvar(kw_curplotname))) {
tv->va_next = v;
v = tv;
}
- if (tv = cp_enqvar(kw_curplotdate)) {
+ if ((tv = cp_enqvar(kw_curplotdate))) {
tv->va_next = v;
v = tv;
}
- if (tv = cp_enqvar(kw_display)) {
+ if ((tv = cp_enqvar(kw_display))) {
tv->va_next = v;
v = tv;
}