[pcsxr] 16/18: Add patch for some easy to fix compiler warnings

James Cowgill jcowgill-guest at moszumanska.debian.org
Wed Mar 30 23:48:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

jcowgill-guest pushed a commit to branch master
in repository pcsxr.

commit ad18d4084157202e34d27e61403860cbcb566723
Author: James Cowgill <james410 at cowgill.org.uk>
Date:   Wed Mar 30 23:59:10 2016 +0100

    Add patch for some easy to fix compiler warnings
---
 debian/patches/06_warnings.patch | 44 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 2 files changed, 45 insertions(+)

diff --git a/debian/patches/06_warnings.patch b/debian/patches/06_warnings.patch
new file mode 100644
index 0000000..8e57dd2
--- /dev/null
+++ b/debian/patches/06_warnings.patch
@@ -0,0 +1,44 @@
+Description: Fix some compiler warnings caused by obviously incorrect code
+Author: James Cowgill <jcowgill at 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;
+   }
diff --git a/debian/patches/series b/debian/patches/series
index 15dc751..0b39d53 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 03_fix-plugin-dir.patch
 04_update-homedir-symlinks.patch
 05_format-security.patch
+06_warnings.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/pcsxr.git



More information about the Pkg-games-commits mailing list