diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-09 18:18:58 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-09 21:46:58 -0800 |
commit | f2c40907c53ac403e0354d97d7d2fc7ae701ee5e (patch) | |
tree | e4a4cddba8e29ad602f09db7a3e29a4fd9cfc40e /subsurface-core/dive.h | |
parent | ee6f60515cbb22d3946780e7a9bbfcc38133121c (diff) | |
download | subsurface-f2c40907c53ac403e0354d97d7d2fc7ae701ee5e.tar.gz |
Clean up signedness confusion in dive.c
This started out as cleaning up warnings - but it actually turned into a
matter of semantics and correctness. Which lead to changes in .h files
which will have a ton of ripple effects.
A lot more of this to come.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/dive.h')
-rw-r--r-- | subsurface-core/dive.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subsurface-core/dive.h b/subsurface-core/dive.h index f8970b237..f84d45c24 100644 --- a/subsurface-core/dive.h +++ b/subsurface-core/dive.h @@ -387,7 +387,7 @@ extern timestamp_t picture_get_timestamp(char *filename); extern void dive_set_geodata_from_picture(struct dive *d, struct picture *pic); extern int explicit_first_cylinder(struct dive *dive, struct divecomputer *dc); -extern int get_depth_at_time(struct divecomputer *dc, int time); +extern int get_depth_at_time(struct divecomputer *dc, unsigned int time); static inline int get_surface_pressure_in_mbar(const struct dive *dive, bool non_null) { @@ -567,7 +567,7 @@ static inline struct divecomputer *get_dive_dc(struct dive *dive, int nr) extern timestamp_t dive_endtime(const struct dive *dive); extern void make_first_dc(void); -extern int count_divecomputers(void); +extern unsigned int count_divecomputers(void); extern void delete_current_divecomputer(void); /* @@ -737,7 +737,7 @@ extern void copy_samples(struct divecomputer *s, struct divecomputer *d); extern bool is_cylinder_used(struct dive *dive, int idx); extern void fill_default_cylinder(cylinder_t *cyl); extern void add_gas_switch_event(struct dive *dive, struct divecomputer *dc, int time, int idx); -extern struct event *add_event(struct divecomputer *dc, int time, int type, int flags, int value, const char *name); +extern struct event *add_event(struct divecomputer *dc, unsigned int time, int type, int flags, int value, const char *name); extern void remove_event(struct event *event); extern void update_event_name(struct dive *d, struct event* event, char *name); extern void add_extra_data(struct divecomputer *dc, const char *key, const char *value); @@ -892,7 +892,7 @@ extern depth_t string_to_depth(const char *str); extern pressure_t string_to_pressure(const char *str); extern volume_t string_to_volume(const char *str, pressure_t workp); extern fraction_t string_to_fraction(const char *str); -extern void average_max_depth(struct diveplan *dive, int *avg_depth, int *max_depth); +extern void average_max_depth(struct diveplan *dive, unsigned int *avg_depth, unsigned int *max_depth); #include "pref.h" |