Commit Graph

2 Commits

Author SHA1 Message Date
Harald Welte 8bb639ac3b 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: Iae13f7a4cf89230f308eb0183d993d7c31024907
2018-10-15 01:52:20 +02:00
Kevin Redon 70a8486cb3 add simtrace2 host libraries
these are copies of files from simtrace2
2018-10-12 14:57:29 +02:00