From: mike Date: Wed, 11 Apr 2007 13:18:26 +0000 (+0000) Subject: Fix strict aliasing warning (STR #2340) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13b236fe6e3b80fb451656f3607e5f86b7795e05;p=thirdparty%2Fcups.git Fix strict aliasing warning (STR #2340) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6449 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES-1.2.txt b/CHANGES-1.2.txt index a6b1ba0d02..4bea832db4 100644 --- a/CHANGES-1.2.txt +++ b/CHANGES-1.2.txt @@ -3,6 +3,15 @@ CHANGES-1.2.txt CHANGES IN CUPS V1.2.11 + - Fixed some GCC compile warnings (STR #2340) + - The DBUS notification code was broken for older + versions of DBUS (STR #2327) + - The IPv6 code did not compile on HP-UX 11.23 (STR + #2331) + - PPD constraints did not work properly with custom + options. + - Regular PPD options with the name "CustomFoo" did + not work. - The USB backend did not work on NetBSD (STR #2324) - The printer-state-reasons attribute was incorrectly cleared after a job completed (STR #2323) diff --git a/scheduler/printers.c b/scheduler/printers.c index 293f220498..b4bd452ec2 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -266,7 +266,7 @@ cupsdCreateCommonData(void) *notifier; /* Current notifier */ static const int nups[] = /* number-up-supported values */ { 1, 2, 4, 6, 9, 16 }; - static const ipp_orient_t orients[4] =/* orientation-requested-supported values */ + static const int orients[4] =/* orientation-requested-supported values */ { IPP_PORTRAIT, IPP_LANDSCAPE, @@ -289,7 +289,7 @@ cupsdCreateCommonData(void) "1.0", "1.1" }; - static const ipp_op_t ops[] = /* operations-supported values */ + static const int ops[] = /* operations-supported values */ { IPP_PRINT_JOB, IPP_VALIDATE_JOB, @@ -545,11 +545,11 @@ cupsdCreateCommonData(void) /* operations-supported */ ippAddIntegers(CommonData, IPP_TAG_PRINTER, IPP_TAG_ENUM, "operations-supported", - sizeof(ops) / sizeof(ops[0]) + JobFiles - 1, (int *)ops); + sizeof(ops) / sizeof(ops[0]) + JobFiles - 1, ops); /* orientation-requested-supported */ ippAddIntegers(CommonData, IPP_TAG_PRINTER, IPP_TAG_ENUM, - "orientation-requested-supported", 4, (int *)orients); + "orientation-requested-supported", 4, orients); /* page-ranges-supported */ ippAddBoolean(CommonData, IPP_TAG_PRINTER, "page-ranges-supported", 1); @@ -1651,7 +1651,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ ipp_attribute_t *attr; /* Attribute data */ ipp_value_t *val; /* Attribute value */ int num_finishings; /* Number of finishings */ - ipp_finish_t finishings[5]; /* finishings-supported values */ + int finishings[5]; /* finishings-supported values */ cups_option_t *option; /* Current printer option */ static const char * const sides[3] = /* sides-supported values */ { @@ -2288,7 +2288,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */ } ippAddIntegers(p->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, - "finishings-supported", num_finishings, (int *)finishings); + "finishings-supported", num_finishings, finishings); ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "finishings-default", IPP_FINISHINGS_NONE); }