void-packages/srcpkgs/pcsxr/patches/06_warnings.patch
q66 cabbb8a1ca pcsxr: update to 1.9.94
This switches distfiles source as the original does ńot have the
new version. It also adds a bunch of patches, including fixes for
ppc and so on, from Debian.
2019-06-25 21:53:05 +02:00

44 lines
1.9 KiB
Diff

Description: Fix some compiler warnings caused by obviously incorrect code
Author: James Cowgill <jcowgill@debian.org>
Forwarded: no
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/plugins/dfinput/xkb.c
+++ b/plugins/dfinput/xkb.c
@@ -46,10 +46,10 @@ void InitKeyboard() {
resumeScrSaver = 0;
if (g.cfg.PreventScrSaver) {
char buf[64];
- snprintf(buf, 64, "xdg-screensaver suspend 0x%x > /dev/null 2>&1", window);
+ snprintf(buf, 64, "xdg-screensaver suspend 0x%p > /dev/null 2>&1", window);
if (pclose(popen(buf, "r")) == 0) {
resumeScrSaver = 1;
- printf("Suspending Window ID 0x%x of activating screensaver.\n", window);
+ printf("Suspending Window ID 0x%p of activating screensaver.\n", window);
} else {
//resumeScrSaver = 0;
fprintf(stderr, "Failed to execute xdg-screensaver (maybe not installed?)\n");
@@ -78,8 +78,8 @@ void DestroyKeyboard() {
// Enable screensaver if it was disabled - this could be in different place
if (resumeScrSaver) {
char buf[64];
- printf("Resuming Window ID 0x%x to activate screensaver.\n", window);
- snprintf(buf, 64, "xdg-screensaver resume 0x%x", window);
+ printf("Resuming Window ID 0x%p to activate screensaver.\n", window);
+ snprintf(buf, 64, "xdg-screensaver resume 0x%p", window);
FILE *phandle = popen(buf, "r");
pclose(phandle);
}
--- a/plugins/dfsound/freeze.c
+++ b/plugins/dfsound/freeze.c
@@ -217,8 +217,8 @@ void LoadStateUnknown(SPUFreeze_t * pF)
s_chan[i].bNew=0;
s_chan[i].bStop=0;
s_chan[i].ADSR.lVolume=0;
- s_chan[i].pLoop=(unsigned char *)((int)spuMemC+4096);
- s_chan[i].pStart=(unsigned char *)((int)spuMemC+4096);
+ s_chan[i].pLoop=(unsigned char *)(spuMemC+4096);
+ s_chan[i].pStart=(unsigned char *)(spuMemC+4096);
s_chan[i].iMute=0;
s_chan[i].iIrqDone=0;
}