diff options
author | Ludovic Rousseau <rousseau@debian.org> | 2010-03-19 15:35:14 +0100 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2010-11-22 05:46:40 +0100 |
commit | 3b41c31d3fa2c1f93649cc5fc0f59acbf3efd5a1 (patch) | |
tree | 8cdc17d27868c3a32da14395f2ee9af490790edf /libusb/descriptor.c | |
parent | 7f2e9f0776386997d2b4c4c47598ab88e3caeb7a (diff) | |
download | libusb-3b41c31d3fa2c1f93649cc5fc0f59acbf3efd5a1.tar.gz |
Use const for the usbi_parse_descriptor() format string
Constant strings should be "const char *" instead of "char *". Silence
"discards qualifiers from pointer target type" warnings. Fixes #61.
Diffstat (limited to 'libusb/descriptor.c')
-rw-r--r-- | libusb/descriptor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libusb/descriptor.c b/libusb/descriptor.c index 54a47b4..f25a8b3 100644 --- a/libusb/descriptor.c +++ b/libusb/descriptor.c @@ -39,12 +39,12 @@ /* set host_endian if the w values are already in host endian format, * as opposed to bus endian. */ -int usbi_parse_descriptor(unsigned char *source, char *descriptor, void *dest, - int host_endian) +int usbi_parse_descriptor(unsigned char *source, const char *descriptor, + void *dest, int host_endian) { unsigned char *sp = source, *dp = dest; uint16_t w; - char *cp; + const char *cp; for (cp = descriptor; *cp; cp++) { switch (*cp) { |