]> git.street.me.uk Git - andy/viking.git/blobdiff - src/degrees_converters.c
[QA] Add default cases for all switch statements.
[andy/viking.git] / src / degrees_converters.c
index fbf433fd1057a2bf609b8e35621a231db7ad00d2..f78b178f9fb15d7dfecf0586f9cae98ca1e93a23 100644 (file)
@@ -25,8 +25,8 @@
 #ifdef HAVE_MATH_H
 #include <math.h>
 #endif
-#include <glib.h>
 #include <string.h>
+#include "degrees_converters.h"
 
 #define DEGREE_SYMBOL "\302\260"
 
@@ -138,7 +138,7 @@ static gchar *convert_dec_to_dms(gdouble dec, gchar pos_c, gchar neg_c)
   val_s = (tmp - val_m) * 60;
 
   /* Format */
-  result = g_strdup_printf ( "%c%d" DEGREE_SYMBOL "%d'%f\"",
+  result = g_strdup_printf ( "%c%d" DEGREE_SYMBOL "%d'%.4f\"",
                              sign_c, val_d, val_m, val_s );
   return result;
 }
@@ -190,6 +190,7 @@ gdouble convert_dms_to_dec(const gchar *dms)
                        case 3:
                                s = value;
                                break;
+                       default: break;
                }
                        }
                } while (ptr != NULL && endptr != NULL);