summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-03 14:16:09 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-03 14:21:13 -0700
commit98414ac9a9ab927b475088a982ebaf8200c647c8 (patch)
tree498f44c1ef1eada20658244e5e59855d08a58d37 /divelist.c
parent060e5c764cc66e54f422928e3921fd08dff31f69 (diff)
downloadsubsurface-98414ac9a9ab927b475088a982ebaf8200c647c8.tar.gz
Fix compiler warnings
Doing this on Arch Linux with gcc 4.8.0 helped find one real bug. The rest are simply changes to make static functions externally visible (as they are kept around to eventually become helpers used by Qt) which for now avoids the warnings. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/divelist.c b/divelist.c
index e22dd331a..deab1b05c 100644
--- a/divelist.c
+++ b/divelist.c
@@ -620,12 +620,12 @@ char *get_nitrox_string(struct dive *dive)
o2low = (o2low + 5) / 10;
if (he)
- snprintf(buffer, sizeof(buffer), "%d/%d", o2, he);
+ snprintf(buffer, MAX_NITROX_STRING, "%d/%d", o2, he);
else if (o2)
if (o2 == o2low)
- snprintf(buffer, sizeof(buffer), "%d", o2);
+ snprintf(buffer, MAX_NITROX_STRING, "%d", o2);
else
- snprintf(buffer, sizeof(buffer), "%d" UTF8_ELLIPSIS "%d", o2low, o2);
+ snprintf(buffer, MAX_NITROX_STRING, "%d" UTF8_ELLIPSIS "%d", o2low, o2);
else
strcpy(buffer, _("air"));
}