]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/testmime.c
Full sweep of all Clang warnings, plus some bug fixes for incorrect memcpy usage.
[thirdparty/cups.git] / scheduler / testmime.c
index 9d68abb4d2ecbe4e022086b6cb89978fb5e9dd5d..176e23767eba4e5e1493e3e57e9abb028340fbb2 100644 (file)
@@ -1,24 +1,16 @@
 /*
- * "$Id: testmime.c 7670 2008-06-17 22:42:08Z mike $"
+ * "$Id$"
  *
- *   MIME test program for CUPS.
+ * MIME test program for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2006 by Easy Software Products, all rights reserved.
  *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * Contents:
- *
- *   main()            - Main entry for the test program.
- *   add_ppd_filter()  - Add a printer filter from a PPD.
- *   add_ppd_filters() - Add all filters from a PPD.
- *   print_rules()     - Print the rules for a file type...
- *   type_dir()        - Show the MIME types for a given directory.
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file.  If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  */
 
 /*
@@ -132,10 +124,10 @@ main(int  argc,                           /* I - Number of command-line args */
     }
     else
     {
-      sscanf(argv[i], "%15[^/]/%31s", super, type);
+      sscanf(argv[i], "%15[^/]/%255s", super, type);
       dst = mimeType(mime, super, type);
 
-      filters = mimeFilter2(mime, src, srcinfo.st_size, dst, &cost);
+      filters = mimeFilter2(mime, src, (size_t)srcinfo.st_size, dst, &cost);
 
       if (!filters)
       {
@@ -264,7 +256,7 @@ add_ppd_filter(mime_t      *mime,   /* I - MIME database */
   {
     char       *ptr;                   /* Pointer into maxsize(nnnn) program */
 
-    maxsize = strtoll(program + 8, &ptr, 10);
+    maxsize = (size_t)strtoll(program + 8, &ptr, 10);
 
     if (*ptr != ')')
     {
@@ -527,5 +519,5 @@ type_dir(mime_t     *mime,          /* I - MIME database */
 
 
 /*
- * End of "$Id: testmime.c 7670 2008-06-17 22:42:08Z mike $".
+ * End of "$Id$".
  */