diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2014-02-06 18:33:34 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2014-02-06 18:33:34 +0000 |
commit | 7e86f2f686334cb3db458b4585dfce9c1b712bc4 (patch) | |
tree | 88b4a0536faefcada96437e7cddd3a36cfdee0a4 /scheduler/classes.c | |
parent | b1564baed9db112cb1334027f1d141877d88fcf4 (diff) | |
download | cups-7e86f2f686334cb3db458b4585dfce9c1b712bc4.tar.gz |
Full sweep of all Clang warnings, plus some bug fixes for incorrect memcpy usage.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11558 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/classes.c')
-rw-r--r-- | scheduler/classes.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/scheduler/classes.c b/scheduler/classes.c index 5ced554f5..788d5a944 100644 --- a/scheduler/classes.c +++ b/scheduler/classes.c @@ -1,27 +1,16 @@ /* * "$Id$" * - * Printer class routines for the CUPS scheduler. + * Printer class routines for the CUPS scheduler. * - * Copyright 2007-2011 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products, all rights reserved. + * Copyright 2007-2014 by Apple Inc. + * Copyright 1997-2007 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: - * - * cupsdAddClass() - Add a class to the system. - * cupsdAddPrinterToClass() - Add a printer to a class... - * cupsdDeletePrinterFromClass() - Delete a printer from a class. - * cupsdDeletePrinterFromClasses() - Delete a printer from all classes. - * cupsdFindAvailablePrinter() - Find an available printer in a class. - * cupsdFindClass() - Find the named class. - * cupsdLoadAllClasses() - Load classes from the classes.conf file. - * cupsdSaveAllClasses() - Save classes to the classes.conf file. + * 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/". */ /* @@ -93,7 +82,7 @@ cupsdAddPrinterToClass( if (c->num_printers == 0) temp = malloc(sizeof(cupsd_printer_t *)); else - temp = realloc(c->printers, sizeof(cupsd_printer_t *) * (c->num_printers + 1)); + temp = realloc(c->printers, sizeof(cupsd_printer_t *) * (size_t)(c->num_printers + 1)); if (temp == NULL) { @@ -147,7 +136,7 @@ cupsdDeletePrinterFromClass( c->num_printers --; if (i < c->num_printers) memmove(c->printers + i, c->printers + i + 1, - (c->num_printers - i) * sizeof(cupsd_printer_t *)); + (size_t)(c->num_printers - i) * sizeof(cupsd_printer_t *)); } else return (0); |