]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Fix GCC string truncation warnings
authorWolfgang Stöggl <c72578@yahoo.de>
Fri, 12 Apr 2019 14:59:36 +0000 (16:59 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Sat, 13 Apr 2019 15:06:36 +0000 (17:06 +0200)
commit78b1794f380d96a7c95608f74deb11348bd14deb
tree27abd32f3c7517ea2856047c192eb08aa88d546f
parent9d768d89ef53c3d7bcd1e1c8d31dd938b9f2d5ed
Fix GCC string truncation warnings

- Fixes the following GCC compiler warnings:
  rrd_fetch.c:338:9: warning: 'strncpy' output may be truncated copying
  19 bytes from a string of length 19 [-Wstringop-truncation]
    strncpy((*ds_namv)[i], rrd.ds_def[i].ds_nam, DS_NAM_SIZE - 1);
  rrd_tune.c:284:13: warning: 'strncpy' output may be truncated copying
  19 bytes from a string of length 19 [-Wstringop-truncation]
    strncpy(rrd.ds_def[ds].ds_nam, ds_new, DS_NAM_SIZE - 1);
  rrd_graph.c:2282:17: warning: 'strncpy' output may be truncated
    copying 204 bytes from a string of length 204
    [-Wstringop-truncation] strncpy(im->gdes[i].legend, saved_legend,
    sizeof im->gdes[0].legend - 1);
src/rrd_fetch.c
src/rrd_graph.c
src/rrd_tune.c