]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix Linux compiler warning.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 7 Dec 2017 17:02:44 +0000 (12:02 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 7 Dec 2017 17:02:44 +0000 (12:02 -0500)
scheduler/cups-driverd.cxx

index 1c5b26533068680c0beaae9e5727bd431daa978c..33904397b8dc06cd299e2f33146da2542fd35155 100644 (file)
@@ -5,7 +5,7 @@
  * created from driver information files, and dynamically generated PPD files
  * using driver helper programs.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
@@ -2615,7 +2615,7 @@ load_ppds_dat(char   *filename,           /* I - Filename buffer */
     unsigned ppdsync;                  /* Sync word */
     int      num_ppds;                 /* Number of PPDs */
 
-    if (cupsFileRead(fp, (char *)&ppdsync, sizeof(ppdsync)) == sizeof(ppdsync) &&
+    if ((size_t)cupsFileRead(fp, (char *)&ppdsync, sizeof(ppdsync)) == sizeof(ppdsync) &&
         ppdsync == PPD_SYNC &&
         !stat(filename, &fileinfo) &&
        (((size_t)fileinfo.st_size - sizeof(ppdsync)) % sizeof(ppd_rec_t)) == 0 &&
@@ -2724,7 +2724,7 @@ read_tar(cups_file_t *fp,         /* I - Archive to read */
   tar_rec_t    record;                 /* Record from file */
 
 
-  while (cupsFileRead(fp, (char *)&record, sizeof(record)) == sizeof(record))
+  while ((size_t)cupsFileRead(fp, (char *)&record, sizeof(record)) == sizeof(record))
   {
    /*
     * Check for a valid tar header...