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>
This commit is contained in:
Dirk Hohndel 2013-05-03 14:16:09 -07:00
parent 060e5c764c
commit 98414ac9a9
4 changed files with 16 additions and 14 deletions

View file

@ -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"));
}