[speedcrunch/f15] add patch

Daniel Drake dsd at fedoraproject.org
Sat Oct 8 21:11:45 UTC 2011


commit d9db02d5075ad773892412a27119830ceefc78c5
Author: Daniel Drake <dsd at laptop.org>
Date:   Sat Oct 8 22:11:18 2011 +0100

    add patch

 speedcrunch-0.11-char-sign.patch |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/speedcrunch-0.11-char-sign.patch b/speedcrunch-0.11-char-sign.patch
new file mode 100644
index 0000000..a135e94
--- /dev/null
+++ b/speedcrunch-0.11-char-sign.patch
@@ -0,0 +1,30 @@
+From 91c1c0c4a205fa1ccf8679bda5941728c6d0cd15 Mon Sep 17 00:00:00 2001
+From: Henrik Nordstrom <henrik at henriknordstrom.net>
+Date: Thu, 8 Sep 2011 16:32:30 +0200
+Subject: [PATCH] Avoid using char as loop variable. Signedness of char varies across platorms
+
+_factor entered an infinite loop on platforms where char is unsigned.
+
+generally better to use int as loop variable. It's both signed and the
+most efficient data type for simple integer calculations across the different
+cpu architectures.
+---
+ src/math/floatlog.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/math/floatlog.c b/src/math/floatlog.c
+index 016f42d..6c410ee 100644
+--- a/src/math/floatlog.c
++++ b/src/math/floatlog.c
+@@ -118,7 +118,7 @@ _factor(
+   int idx)
+ {
+   int factor;
+-  char i;
++  int i;
+ 
+   factor = 1;
+   for (i = _lincombtbl[idx].c2; --i >= 0;)
+-- 
+1.6.1
+


More information about the scm-commits mailing list