Bug#836983: Patch
Frédéric Bonnard
frediz at debian.org
Thu Dec 7 17:00:19 UTC 2017
Graham, here is patch attached for the issue.
By default some architectures have "char" being unsigned such as the ones
listed here and others ( https://wiki.debian.org/ArchitectureSpecificsMemo ).
I just forced the sign-ness of pow()'s argument.
Sorry for the delay.
F.
On Mon, 20 Nov 2017 21:10:24 +0200, Graham Inggs <ginggs at debian.org> wrote:
> Hi Frederic
>
> > Just for the record, this bug also happens on arm64.
> > This seems to be a regression. I'm trying to bisect that.
>
> Did you ever make any progress with this?
>
> Regards
> Graham
>
-------------- next part --------------
Index: freecad-0.16.6712+dfsg1/src/Base/Unit.cpp
===================================================================
--- freecad-0.16.6712+dfsg1.orig/src/Base/Unit.cpp 2017-07-17 17:27:47.000000000 +0000
+++ freecad-0.16.6712+dfsg1/src/Base/Unit.cpp 2017-12-07 16:14:39.330651565 +0000
@@ -113,7 +113,7 @@
}
-Unit Unit::pow(char exp)const
+Unit Unit::pow(signed char exp)const
{
checkRange("pow()",
(int32_t)Sig.Length * (int32_t)exp,
Index: freecad-0.16.6712+dfsg1/src/Base/Unit.h
===================================================================
--- freecad-0.16.6712+dfsg1.orig/src/Base/Unit.h 2017-07-17 17:27:47.000000000 +0000
+++ freecad-0.16.6712+dfsg1/src/Base/Unit.h 2017-12-07 16:15:07.739356583 +0000
@@ -79,7 +79,7 @@
bool operator ==(const Unit&) const;
bool operator !=(const Unit&that) const {return !(*this == that);}
Unit& operator =(const Unit&);
- Unit pow(char exp)const;
+ Unit pow(signed char exp)const;
//@}
/// get the unit signature
const UnitSignature & getSignature(void)const {return Sig;}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20171207/589feb15/attachment.sig>
More information about the debian-science-maintainers
mailing list