Bug#836432: muse: Type problem with previously submitted patch
Philip Chung
philipchung1995 at yahoo.com
Sat Sep 3 03:39:37 UTC 2016
Package: muse
Version: 2.1.2-2
Severity: normal
Hello,
In bug #831147 I submitted a patch, which was incorporated as
"1002-abs-errors.patch". However, there is a problem with the changes to
muse/midiedit/ecanvas.cpp
When <math.h> is included, it seems that GCC 6 provides the C++
overloads of the functions in the global namespace. In this case,
floating-point overloads of abs() are provided.
The arguments to the invocations of abs() in ecanvas.cpp are unsigned
int, and it turns out that they actually call the "double abs(double)"
overload, rather than an integer overload as intended.
You can verify this with a simple test program:
#include <iostream>
#include <math.h>
#include <typeinfo>
int main() {
unsigned int x = 0;
std::cout << typeid(abs(x)).name() << std::endl;
return 0;
}
Running the output of this program through "c++filt -t" gives "double".
I don't think this is a major problem, but I think it should be fixed. I
will send an updated version of the patch that references this bug report.
Philip Chung
More information about the pkg-multimedia-maintainers
mailing list