[gnome-calculator] Fixed compile warnings (fixes #206)



commit 2f362f3661b9ab728f4775d4762cfae5870db8bb
Author: Robert Roth <robert roth off gmail com>
Date:   Tue Feb 23 22:32:51 2021 +0200

    Fixed compile warnings (fixes #206)

 src/math-converter.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/math-converter.vala b/src/math-converter.vala
index 755e1d0e..9e4f8ed5 100644
--- a/src/math-converter.vala
+++ b/src/math-converter.vala
@@ -241,6 +241,8 @@ public class MathConverter : Gtk.Grid
 
     private void do_convert (out Unit? from_unit, out Unit? to_unit) {
         var x = equation.number;
+        from_unit = null;
+        to_unit = null;
         if (x != null)
         {
             var z = convert_equation (x, out from_unit, out to_unit);
@@ -266,6 +268,8 @@ public class MathConverter : Gtk.Grid
                                        out Unit? target_unit)
     {
         Gtk.TreeIter from_iter, to_iter;
+        source_unit = null;
+        target_unit = null;
         if (!from_combo.get_active_iter (out from_iter))
             return null;
         if (!to_combo.get_active_iter (out to_iter))


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