[Pkg-wmaker-commits] [wmgtemp] 30/45: debian/patches/fix_-Waggressive-loop-optimizations.patch: Fix compiler warning.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 25 02:58:06 UTC 2015


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

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

commit fd8fa656c5e8cd8a545059bb96552893d7a8b40c
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Mon Feb 2 08:29:10 2015 -0600

    debian/patches/fix_-Waggressive-loop-optimizations.patch: Fix compiler warning.
---
 .../patches/fix_-Waggressive-loop-optimizations.patch   | 17 +++++++++++++++++
 debian/patches/series                                   |  1 +
 2 files changed, 18 insertions(+)

diff --git a/debian/patches/fix_-Waggressive-loop-optimizations.patch b/debian/patches/fix_-Waggressive-loop-optimizations.patch
new file mode 100644
index 0000000..e2a110a
--- /dev/null
+++ b/debian/patches/fix_-Waggressive-loop-optimizations.patch
@@ -0,0 +1,17 @@
+Description: Fix -Waggressive-loop-optimizations compiler warning.
+ In particular, the cpu_history array has length 59, so when i = 58,
+ cpu_history[i+1] is undefined.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2015-02-02
+
+--- a/src/wmgtemp.c
++++ b/src/wmgtemp.c
+@@ -428,7 +428,7 @@
+   double sys_high = highest_temp(sys_history);
+ 
+   /* Shift the arrays */
+-  for(i = 0; i < 59; i++) {
++  for(i = 0; i < 58; i++) {
+     cpu_history[i] = cpu_history[i + 1];
+     sys_history[i] = sys_history[i + 1];
+   }
diff --git a/debian/patches/series b/debian/patches/series
index 0a12a42..97f3b2d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 000_fix_hypens_in_wmtemp.1.diff
 001_sensors.conf.diff
 update_makefile.patch
+fix_-Waggressive-loop-optimizations.patch

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



More information about the Pkg-wmaker-commits mailing list