summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-17 09:12:08 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-17 10:25:01 -0800
commit6b80b41c7cc8b56ea70447dc4dfaf250fa6f4743 (patch)
treeb25431c0cbb694695b69feaee5f0c5fafd22586c /core
parent648fec7a3d0b65afdc95c71a638d0f792b93adf2 (diff)
downloadsubsurface-6b80b41c7cc8b56ea70447dc4dfaf250fa6f4743.tar.gz
Cleanup: durations are now signed
Somehow a whitespace fix snuck in here. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/gaspressures.c2
-rw-r--r--core/import-suunto.c4
-rw-r--r--core/planner.c4
-rw-r--r--core/statistics.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/core/gaspressures.c b/core/gaspressures.c
index 206998101..98b574023 100644
--- a/core/gaspressures.c
+++ b/core/gaspressures.c
@@ -389,7 +389,7 @@ void populate_pressure_information(struct dive *dive, struct divecomputer *dc, s
for (int i = first; i <= last; i++) {
struct plot_data *entry = pi->entry + i;
unsigned pressure = SENSOR_PRESSURE(entry, sensor);
- unsigned int time = entry->sec;
+ int time = entry->sec;
while (ev && ev->time.seconds <= time) {
cyl = get_cylinder_index(dive, ev);
diff --git a/core/import-suunto.c b/core/import-suunto.c
index 90ceda1c4..35a2c86de 100644
--- a/core/import-suunto.c
+++ b/core/import-suunto.c
@@ -160,7 +160,7 @@ extern int dm4_dive(void *param, int columns, char **data, char **column)
{
(void) columns;
(void) column;
- unsigned int i;
+ int i;
int interval, retval = 0;
sqlite3 *handle = (sqlite3 *)param;
float *profileBlob;
@@ -363,7 +363,7 @@ extern int dm5_dive(void *param, int columns, char **data, char **column)
{
(void) columns;
(void) column;
- unsigned int i;
+ int i;
int interval, retval = 0, block_size;
sqlite3 *handle = (sqlite3 *)param;
unsigned const char *sampleBlob;
diff --git a/core/planner.c b/core/planner.c
index 8ace46e35..2c5ad3d95 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -116,7 +116,7 @@ int get_gasidx(struct dive *dive, struct gasmix *mix)
void interpolate_transition(struct deco_state *ds, struct dive *dive, duration_t t0, duration_t t1, depth_t d0, depth_t d1, const struct gasmix *gasmix, o2pressure_t po2)
{
- uint32_t j;
+ int32_t j;
for (j = t0.seconds; j < t1.seconds; j++) {
int depth = interpolate(d0.mm, d1.mm, j - t0.seconds, t1.seconds - t0.seconds);
@@ -287,7 +287,7 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive,
free(ev);
}
dp = diveplan->dp;
- /* Create first sample at time = 0, not based on dp because
+ /* Create first sample at time = 0, not based on dp because
* there is no real dp for time = 0, set first cylinder to 0
* O2 setpoint for this sample will be filled later from next dp */
cyl = &dive->cylinder[0];
diff --git a/core/statistics.c b/core/statistics.c
index d2a8d8ae2..13bcc4a97 100644
--- a/core/statistics.c
+++ b/core/statistics.c
@@ -48,7 +48,7 @@ static void process_temperatures(struct dive *dp, stats_t *stats)
static void process_dive(struct dive *dp, stats_t *stats)
{
int old_tadt, sac_time = 0;
- uint32_t duration = dp->duration.seconds;
+ int32_t duration = dp->duration.seconds;
old_tadt = stats->total_average_depth_time.seconds;
stats->total_time.seconds += duration;