[Pkg-wmaker-commits] [wmbatppc] 25/35: debian/patches: (fix_-Wunused-*.patch) Fix compiler warnings.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sat Aug 22 02:23:49 UTC 2015


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

dtorrance-guest pushed a commit to branch master
in repository wmbatppc.

commit 09fc252fee04e2b5466d63515483485b1691493c
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Wed Dec 31 09:46:26 2014 -0600

    debian/patches: (fix_-Wunused-*.patch) Fix compiler warnings.
---
 debian/patches/fix_-Wunused-but-set-variable.patch | 23 +++++++++++++++++++
 debian/patches/fix_-Wunused-result.patch           | 26 ++++++++++++++++++++++
 debian/patches/series                              |  2 ++
 3 files changed, 51 insertions(+)

diff --git a/debian/patches/fix_-Wunused-but-set-variable.patch b/debian/patches/fix_-Wunused-but-set-variable.patch
new file mode 100644
index 0000000..c58bbb9
--- /dev/null
+++ b/debian/patches/fix_-Wunused-but-set-variable.patch
@@ -0,0 +1,23 @@
+Description: Fix -Wunused-but-set-variable compiler warning.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-12-31
+
+--- a/wmbatppc.c
++++ b/wmbatppc.c
+@@ -578,7 +578,6 @@
+ 
+ void DisplayBat(void)
+ {	
+-  int keylargo;
+   unsigned int par = 0;
+   int hour = 0;
+   int min = 0;
+@@ -589,7 +588,7 @@
+   
+   sys_pmu.show_charge_time = 1;
+   
+-  keylargo = keylargo_identify(); /* TODO : use this detection */
++  keylargo_identify();
+ 
+   sys_pmu.read_pmu();
+ 
diff --git a/debian/patches/fix_-Wunused-result.patch b/debian/patches/fix_-Wunused-result.patch
new file mode 100644
index 0000000..f222b22
--- /dev/null
+++ b/debian/patches/fix_-Wunused-result.patch
@@ -0,0 +1,26 @@
+Description: Fix -Wunused-result compiler warning.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-12-31
+
+--- a/wmbatppc.c
++++ b/wmbatppc.c
+@@ -307,13 +307,18 @@
+ {
+   FILE *fd;
+   char buf[25];
++  int f;
+   if (!(fd = fopen ("/proc/device-tree/pci/mac-io/media-bay/compatible", "ro")))
+     return KL_IBOOK;
+   /* 
+    * no media-bay.  definately an iBook...
+    * or a Pismo running a kernel without OF-devtree support...
+    */
+-  fscanf (fd, "%s", buf);
++  f = fscanf (fd, "%s", buf);
++  if (f == EOF) {
++    fprintf(stderr, "fscanf() failed\n");
++    exit(1);
++  }
+   fclose (fd);
+   if (!strcmp ("keylargo-media-bay", buf))	// only the pismo should have one
+     return KL_PISMO;	// has one, its a pismo
diff --git a/debian/patches/series b/debian/patches/series
index 3df1e44..6758c8d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@ fix_link_order.patch
 remove_X11R6_dir.patch
 fix_build_flags.patch
 use_relative_symlinks.patch
+fix_-Wunused-but-set-variable.patch
+fix_-Wunused-result.patch

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



More information about the Pkg-wmaker-commits mailing list