]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Eliminate Clang warnings.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 23 Mar 2015 17:28:46 +0000 (17:28 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 23 Mar 2015 17:28:46 +0000 (17:28 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12559 a1ca3aef-8c08-0410-bb20-df032aa958be

backend/usb-darwin.c
systemv/cupstestppd.c

index f782e5d2465db394631d6ff6d81ca9a8842c814d..8b70c621ca360bfd6a3e6f7810cf4e910d1f6eda 100644 (file)
@@ -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;
index 23982829f4096242afa2f7ad4dce3f4500b11fb5..b99208db1018a488d0cb283ef1a93e097bb25cd5 100644 (file)
@@ -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, "-"))