void-packages/srcpkgs/frame/patches/fix-gcc6-uninitialized.patch

24 lines
717 B
Diff

Initialize variables which gcc6 for musl libc complains
may be unitialized when returned.
--- a/src/touch.cpp 2013-02-08 20:05:24.000000000 +0100
+++ b/src/touch.cpp 2016-10-04 10:57:05.683000000 +0200
@@ -195,7 +195,7 @@
}
float frame_touch_get_device_x(UFTouch touch) {
- float x;
+ float x = 0.0f;
const oif::frame::UFTouch* uftouch =
static_cast<const oif::frame::UFTouch*>(touch);
UFStatus status = uftouch->GetValue(UFAxisTypeX, &x);
@@ -204,7 +204,7 @@
}
float frame_touch_get_device_y(UFTouch touch) {
- float y;
+ float y = 0.0f;
const oif::frame::UFTouch* uftouch =
static_cast<const oif::frame::UFTouch*>(touch);
UFStatus status = uftouch->GetValue(UFAxisTypeY, &y);