diff options
-rw-r--r-- | backend/usb-darwin.c | 11 | ||||
-rw-r--r-- | systemv/cupstestppd.c | 28 |
2 files changed, 20 insertions, 19 deletions
diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c index f782e5d24..8b70c621c 100644 --- a/backend/usb-darwin.c +++ b/backend/usb-darwin.c @@ -1226,6 +1226,7 @@ static void device_added(void *userdata, io_iterator_t iterator) static Boolean list_device_cb(void *refcon, io_service_t obj, CFStringRef deviceIDString, UInt32 deviceLocation, UInt8 interfaceNum, UInt8 alternateSetting) { + (void)refcon; (void)interfaceNum; (void)alternateSetting; @@ -1591,15 +1592,15 @@ static CFStringRef printer_interface_deviceid(IOUSBInterfaceInterface220 **print request.pData = NULL; } - IOReturn err = kIOReturnError; + IOReturn berr = kIOReturnError; char *buffer = malloc(size); if (buffer == NULL) return kIOReturnNoMemory; request.wLength = HostToUSBWord(size); request.pData = buffer; - err = (*printer)->ControlRequestTO(printer, (UInt8)0, &request); - return err; + berr = (*printer)->ControlRequestTO(printer, (UInt8)0, &request); + return berr; }; /* This request takes the 0 based configuration index. IOKit returns a 1 based configuration index */ @@ -1775,7 +1776,7 @@ static CFStringRef printer_interface_indexed_description(IOUSBInterfaceInterface request.wIndex = language; bzero(description, length); - request.wLength = length; + request.wLength = (UInt16)length; request.pData = &description; request.completionTimeout = 0; request.noDataTimeout = 60L; @@ -1799,7 +1800,7 @@ static CFStringRef printer_interface_indexed_description(IOUSBInterfaceInterface if (length > maxLength - 1) length = maxLength -1; - for (int i = 0; i < length; i++) + for (unsigned i = 0; i < length; i++) buffer[i] = (char) description[2*i+2]; buffer[length] = 0; diff --git a/systemv/cupstestppd.c b/systemv/cupstestppd.c index 23982829f..b99208db1 100644 --- a/systemv/cupstestppd.c +++ b/systemv/cupstestppd.c @@ -2378,11 +2378,11 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */ if (!strncmp(program, "maxsize(", 8)) { size_t maxsize; /* Maximum file size */ - char *ptr; /* Pointer into maxsize(nnnn) program */ + char *mptr; /* Pointer into maxsize(nnnn) program */ - maxsize = (size_t)strtoll(program + 8, &ptr, 10); + maxsize = (size_t)strtoll(program + 8, &mptr, 10); - if (*ptr != ')') + if (*mptr != ')') { if (!warn && !errors && !verbose) _cupsLangPuts(stdout, _(" FAIL")); @@ -2398,11 +2398,11 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */ continue; } - ptr ++; - while (_cups_isspace(*ptr)) - ptr ++; + mptr ++; + while (_cups_isspace(*mptr)) + mptr ++; - _cups_strcpy(program, ptr); + _cups_strcpy(program, mptr); } if (strcmp(program, "-")) @@ -2497,11 +2497,11 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */ if (!strncmp(program, "maxsize(", 8)) { size_t maxsize; /* Maximum file size */ - char *ptr; /* Pointer into maxsize(nnnn) program */ + char *mptr; /* Pointer into maxsize(nnnn) program */ - maxsize = (size_t)strtoll(program + 8, &ptr, 10); + maxsize = (size_t)strtoll(program + 8, &mptr, 10); - if (*ptr != ')') + if (*mptr != ')') { if (!warn && !errors && !verbose) _cupsLangPuts(stdout, _(" FAIL")); @@ -2517,11 +2517,11 @@ check_filters(ppd_file_t *ppd, /* I - PPD file */ continue; } - ptr ++; - while (_cups_isspace(*ptr)) - ptr ++; + mptr ++; + while (_cups_isspace(*mptr)) + mptr ++; - _cups_strcpy(program, ptr); + _cups_strcpy(program, mptr); } if (strcmp(program, "-")) |