[gcalctool] Fix compile warnings



commit 1ed8e368fc94020146ddd43ddc00f7a82473154c
Author: Robert Ancell <robert ancell canonical com>
Date:   Sun Jul 10 20:58:13 2011 +1000

    Fix compile warnings

 src/math-buttons.c  |    3 ---
 src/mp-serializer.c |    5 +----
 src/mp.c            |    7 +------
 3 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/src/math-buttons.c b/src/math-buttons.c
index 86f7c1e..58fbab3 100644
--- a/src/math-buttons.c
+++ b/src/math-buttons.c
@@ -748,14 +748,11 @@ load_buttons(MathButtons *buttons)
 void
 math_buttons_set_mode(MathButtons *buttons, ButtonMode mode)
 {
-    ButtonMode old_mode;
-
     g_return_if_fail(buttons != NULL);
  
     if (buttons->priv->mode == mode)
         return;
 
-    old_mode = buttons->priv->mode;
     buttons->priv->mode = mode;
   
     if (mode == PROGRAMMING)
diff --git a/src/mp-serializer.c b/src/mp-serializer.c
index 543c081..356fc55 100644
--- a/src/mp-serializer.c
+++ b/src/mp-serializer.c
@@ -306,16 +306,13 @@ mp_cast_to_exponential_string(MpSerializer *serializer, const MPNumber *x, gbool
 
     if (mp_is_complex(x)) {
         GString *s;
-        gboolean force_sign = TRUE;
         MPNumber x_im;
         int n_complex_digits = 0;
 
         mp_imaginary_component(x, &x_im);
 
-        if (strcmp(string->str, "0") == 0) {
+        if (strcmp(string->str, "0") == 0)
             g_string_assign(string, "");
-            force_sign = FALSE;
-        }
 
         s = g_string_sized_new(1024);
         exponent = mp_cast_to_exponential_string_real(serializer, &x_im, s, eng_format, &n_complex_digits);
diff --git a/src/mp.c b/src/mp.c
index ae9caf9..3003202 100644
--- a/src/mp.c
+++ b/src/mp.c
@@ -986,7 +986,7 @@ mp_epowy_real(const MPNumber *x, MPNumber *z)
 {
     float r__1;
     int i, ix, xs, tss;
-    float rx, rz, rlb;
+    float rx, rz;
     MPNumber t1, t2;
 
     /* e^0 = 1 */
@@ -1001,11 +1001,6 @@ mp_epowy_real(const MPNumber *x, MPNumber *z)
         return;
     }
 
-    /*  SEE IF ABS(X) SO LARGE THAT EXP(X) WILL CERTAINLY OVERFLOW
-     *  OR UNDERFLOW.  1.01 IS TO ALLOW FOR ERRORS IN ALOG.
-     */
-    rlb = log((float)MP_BASE) * 1.01f;
-
     /* NOW SAFE TO CONVERT X TO REAL */
     rx = mp_cast_to_float(x);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]