summaryrefslogtreecommitdiff
path: root/examples/testlibusb.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: Fix format-truncation on debugVictor Toso2018-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | As description is used only for debug, we can extend it to be sure to fit 256 from string variable plus 3 chars from " - " as described in gcc warning below | testlibusb.c: In function ‘print_device.constprop’: | testlibusb.c:188:51: warning: ‘ - ’ directive output may be truncated writing 3 bytes into a region of size between 1 and 256 [-Wformat-truncation=] | snprintf(description, sizeof(description), "%s - ", string); | ^~~ | testlibusb.c:188:5: note: ‘snprintf’ output between 4 and 259 bytes into a destination of size 256 | snprintf(description, sizeof(description), "%s - ", string); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Closes #460 Signed-off-by: Victor Toso <victortoso@redhat.com> Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
* examples: testlibusb: Fix DDK build warningChris Dickens2018-03-241-3/+4
| | | | Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* Misc: Fix testlibusb build on VS2013 and earlier and suppress warningsChris Dickens2017-12-261-0/+4
| | | | Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* examples: reformat testlibusb.cLudovic Rousseau2017-07-121-273/+272
| | | | | convert from DOS to Unix text format remove extra spaces at end of line
* Examples: Ported testlibusb from libus-0.1 to libusb-1.0Anil Nair2016-07-211-0/+273
This commit is based on Nathan's branch https://github.com/hjelmn/libusb-darwin/blob/master/examples/testlibusb1.c Closes #178 Signed-off-by: Nathan Hjelm <hjelmn@me.com>