ports/cad/jspice3/files/patch-src_lib_mfb_mfbgnc.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

29 lines
732 B
C

--- src/lib/mfb/mfbgnc.c.orig 2001-05-01 19:45:26.000000000 +0000
+++ src/lib/mfb/mfbgnc.c
@@ -120,7 +120,7 @@ char *PM;
cp = PM;
dp = result;
if (cp == NULL) {
- return;
+ return (NULL);
}
while (c = *cp++) {
if(c == '$') {
@@ -300,7 +300,7 @@ char *PM;
y1 = reg;
}
else
- return;
+ return (NULL);
hiy = (y1 >> 7) & 037;
extra = x1 & 03 | ((y1 & 03) << 2);
loy = (y1 >> 2) & 037;
@@ -427,7 +427,7 @@ char *PM;
continue;
default:
- return;
+ return (NULL);
}
}
*dp='\0';