File tksao-gcc-errors.patch of Package ds9
tksao: fix no-return-in-nonvoid-function
While this doesn't break the _actual_ build, openSUSE runs additional
checks on the output of gcc's warnings -- resulting in package builds
failing because of upstream bugs.
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Index: b/tksao/frame/context.C
===================================================================
--- a/tksao/frame/context.C
+++ b/tksao/frame/context.C
@@ -837,6 +837,7 @@ FitsZBound* Context::getDataParams(FrSca
case FrScale::CROPSEC:
return &cparams;
}
+ return NULL;
}
Vector Context::getMinMax()
Index: b/tksao/frame/fitsdata.C
===================================================================
--- a/tksao/frame/fitsdata.C
+++ b/tksao/frame/fitsdata.C
@@ -143,6 +143,7 @@ int FitsData::calcIncr()
case FrScale::SAMPLE:
return minmaxSample_;
}
+ return -1;
}
// AutoCut
@@ -290,6 +291,7 @@ double FitsData::min()
else
return 0;
}
+ return 0;
}
double FitsData::max()
@@ -310,6 +312,7 @@ double FitsData::max()
return irafmax_;
return 0;
}
+ return 0;
}
// FitsDatam
Index: b/tksao/frame/frmarkerxml.C
===================================================================
--- a/tksao/frame/frmarkerxml.C
+++ b/tksao/frame/frmarkerxml.C
@@ -958,6 +958,7 @@ double Base::xmlAngle(const char* angle,
case Coord::RAD:
return mapAngleToRef(sign*atof(angle)+offset, sys, sky);
}
+ return 0;
}
double* Base::xmlAngles(const char* angle, int sign, double offset, int cnt,
Index: b/tksao/frame/marker.C
===================================================================
--- a/tksao/frame/marker.C
+++ b/tksao/frame/marker.C
@@ -352,6 +352,7 @@ GC Marker::renderXGC(RenderMode mode)
renderXLineDash(gcxor);
return gcxor;
}
+ return gc;
}
void Marker::renderXLineDash(GC lgc)
@@ -1188,6 +1189,7 @@ double Marker::calcAngle()
case Coord::YY:
return -angle + parent->getRotation();
}
+ return 0;
}
Vector Marker::modifyArrow(const Vector& p1, const Vector& p2,
Index: b/tksao/frame/projection.C
===================================================================
--- a/tksao/frame/projection.C
+++ b/tksao/frame/projection.C
@@ -75,6 +75,7 @@ GC Projection::renderXGC(RenderMode mode
renderXLineDash(gcxor);
return gcxor;
}
+ return gc;
}
void Projection::renderPS(int mode)