summaryrefslogtreecommitdiffstats
path: root/divesite.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-09-23 17:38:38 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-23 09:13:45 -0700
commit4f1ac6804f667f4d1249f61451a40469d5b7fcbd (patch)
tree0e0e6965d9bce98fc9e8bb755f201a0393fefa8c /divesite.c
parent34147426de8b6f5f281623b84e6802a097890468 (diff)
downloadsubsurface-4f1ac6804f667f4d1249f61451a40469d5b7fcbd.tar.gz
divesite.c: fix warnings about unused variables
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divesite.c')
-rw-r--r--divesite.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/divesite.c b/divesite.c
index a8c5ea4be..f668889f3 100644
--- a/divesite.c
+++ b/divesite.c
@@ -55,7 +55,6 @@ uint32_t get_dive_site_uuid_by_gps_and_name(char *name, degrees_t latitude, degr
// Calculate the distance in meters between two coordinates.
unsigned int get_distance(degrees_t lat1, degrees_t lon1, degrees_t lat2, degrees_t lon2)
{
- double lat1_r = udeg_to_radians(lat1.udeg);
double lat2_r = udeg_to_radians(lat2.udeg);
double lat_d_r = udeg_to_radians(lat2.udeg-lat1.udeg);
double lon_d_r = udeg_to_radians(lon2.udeg-lon1.udeg);
@@ -304,12 +303,9 @@ uint32_t find_or_create_dive_site_with_name(const char *name, timestamp_t diveti
{
int i;
struct dive_site *ds;
- bool found = false;
for_each_dive_site(i,ds) {
- if (same_string(name, ds->name)) {
- found = true;
+ if (same_string(name, ds->name))
break;
- }
}
if (ds)
return ds->uuid;