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

20 lines
562 B
C

--- src/lib/sced/labeltxt.c.orig 1997-03-21 22:04:16.000000000 +0000
+++ src/lib/sced/labeltxt.c
@@ -175,7 +175,7 @@ int x, y, degrees, scale;
if (!strcmp(dispdev->name,"wp")) {
/* use plain text for now */
DevText(text,x,y);
- return;
+ return (0);
}
/* Hack! If degrees is >= 90, an angle is assumed.
@@ -185,7 +185,7 @@ int x, y, degrees, scale;
if (!strcmp(dispdev->name,"postscript")) {
PS_ScaledText(text,x,y,degrees);
- return;
+ return (0);
}
if (degrees & 1) {