aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-10-12 15:15:08 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-12 15:15:08 +0200
commitdc85fbc3e13b0463399a64468169ee18698771ab (patch)
tree8491dbe466afbee4213adaeda787c9d088e6582d /contrib
parent66ffb6d4935b8089e6aee4487c5230c04a38866b (diff)
libusb_util.c: Avoid gcc warning about strncpy()
What we're doing is actually legal: We copy the full size of the destination array, and then overwrite the last byte with NUL. However, gcc isn't smart enough to see that: libusb_util.c:162:5: warning: ‘strncpy’ specified bound 20 equals destination size [-Wstringop-truncation] strncpy(out[out_idx].path, path, sizeof(out[out_idx].path)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Let's copy one byte less to make it happy. Change-Id: I30ddacdc73e5245c7c38b92d1e94e39b13fae7d3
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions