[gcalctool] Fix some compile warnings



commit b7ef4818b3fd78ae17fd41870f9adf9c77af160c
Author: Robert Ancell <robert ancell gmail com>
Date:   Thu May 27 16:39:10 2010 +1000

    Fix some compile warnings

 src/math-equation.c    |    2 +-
 src/math-window.c      |    1 +
 src/mp-trigonometric.c |    1 -
 src/mp.c               |    2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/math-equation.c b/src/math-equation.c
index 5d46348..823f097 100644
--- a/src/math-equation.c
+++ b/src/math-equation.c
@@ -183,7 +183,7 @@ reformat_base(MathEquation *equation, gint old_base)
     gunichar sub_zero, sub_nine;
     gchar *text, *read_iter;
     gboolean in_number = FALSE, have_radix = FALSE;
-    gint offset = 0, offset_step = 0, max_digit = 0, base = -1, base_offset;
+    gint offset = 0, offset_step = 0, max_digit = 0, base = -1, base_offset = 0;
     gint ans_start, ans_end;
 
     if (equation->priv->base == old_base)
diff --git a/src/math-window.c b/src/math-window.c
index 18662b6..08c1d88 100644
--- a/src/math-window.c
+++ b/src/math-window.c
@@ -283,6 +283,7 @@ button_mode_changed_cb(MathButtons *buttons, GParamSpec *spec, MathWindow *windo
 
     switch(math_buttons_get_mode(buttons))
     {
+    default:
     case BASIC:
       menu = window->priv->mode_basic_menu_item;
       //FIXME: Should it revert to decimal mode? math_equation_set_number_format(window->priv->equation, DEC);
diff --git a/src/mp-trigonometric.c b/src/mp-trigonometric.c
index 0297545..aef3b84 100644
--- a/src/mp-trigonometric.c
+++ b/src/mp-trigonometric.c
@@ -158,7 +158,6 @@ void
 mp_sin(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
 {
     int xs;
-    float rx = 0.0;
     MPNumber x_radians;
 
     /* sin(0) = 0 */
diff --git a/src/mp.c b/src/mp.c
index 73843e5..3b7c20c 100644
--- a/src/mp.c
+++ b/src/mp.c
@@ -1856,7 +1856,7 @@ mp_root(const MPNumber *x, int64_t n, MPNumber *z)
         mp_invert_sign(z, z);
     }
     else if (mp_is_complex(x) || mp_is_negative(x)) {
-        MPNumber r, theta, i;
+        MPNumber r, theta;
 
         mp_abs(x, &r);
         mp_arg(x, MP_RADIANS, &theta);



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