void-packages/srcpkgs/frame/patches/fix-gcc6-uninitialized.patch
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

23 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);