diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-01-04 09:18:46 +0100 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-01-05 00:29:20 +0100 |
commit | c4c57b287e7c3c284139c1868646e3d6c27e6aff (patch) | |
tree | 36775f8342a280289cf8c2e8482fe766f7b4b68a /desktop-widgets | |
parent | 90ba4e5dcad7add798986e493c9b8972bdaf43fe (diff) | |
download | subsurface-c4c57b287e7c3c284139c1868646e3d6c27e6aff.tar.gz |
Increase size of name_buffer to fit any integer
In libdivecomputer.c, name_buffer is formatted with calls like
snprintf(name_buffer, 9, "%d cuft", rounded_size);
This works fine in the regular case, but it generates compiler
warnings, since theoretically the integer might produce up to
11 digits, leading to a truncation of the string.
Increasing the size of name_buffer to 17 chars silences these
warnings. This may seem like pointless warning-silencing.
Nevertheless, in the case of invalid data, it might make debugging
easier since, in the above case, the "cuft" is never truncated.
In total, it seems that this is a benign change with potential,
though in a very unlikely case, positive effects.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
0 files changed, 0 insertions, 0 deletions