]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Resolve new compiler warnings.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 2 Oct 2019 19:37:50 +0000 (15:37 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 2 Oct 2019 19:37:50 +0000 (15:37 -0400)
cups/sidechannel.c
cups/snmp.c
scheduler/ipp.c

index b43123a8c37bfe7896dabf69156fa8db61cde7f0..56a5d011621e772c43f63c6652a35684a557633a 100644 (file)
@@ -1,10 +1,11 @@
 /*
  * Side-channel API code for CUPS.
  *
- * Copyright 2007-2014 by Apple Inc.
- * Copyright 2006 by Easy Software Products.
+ * Copyright © 2007-2019 by Apple Inc.
+ * Copyright © 2006 by Easy Software Products.
  *
- * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  */
 
 /*
@@ -589,8 +590,8 @@ cupsSideChannelWrite(
   if ((buffer = _cupsBufferGet((size_t)datalen + 4)) == NULL)
     return (-1);
 
-  buffer[0] = command;
-  buffer[1] = status;
+  buffer[0] = (char)command;
+  buffer[1] = (char)status;
   buffer[2] = (char)(datalen >> 8);
   buffer[3] = (char)(datalen & 255);
 
index 1d9da01f20b9c75cb3976dc57a41c661623edddc..6da119d7679d6c37863f8954e4fb7d18e0767d17 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * SNMP functions for CUPS.
  *
- * Copyright © 2007-2014 by Apple Inc.
+ * Copyright © 2007-2019 by Apple Inc.
  * Copyright © 2006-2007 by Easy Software Products, all rights reserved.
  *
  * Licensed under Apache License v2.0.  See the file "LICENSE" for more
@@ -1167,7 +1167,7 @@ asn1_encode_snmp(unsigned char *buffer,   /* I - Buffer */
   memcpy(bufptr, packet->community, commlen);
   bufptr += commlen;
 
-  *bufptr++ = packet->request_type;    /* Get-Request-PDU/Get-Next-Request-PDU */
+  *bufptr++ = (unsigned char)packet->request_type;     /* Get-Request-PDU/Get-Next-Request-PDU */
   asn1_set_length(&bufptr, reqlen);
 
   asn1_set_integer(&bufptr, (int)packet->request_id);
index a385597513d25b6033bab158a104d61d1809bcbc..2fe3bf25cc3ac6d384663a95788ae9bf6f18deb2 100644 (file)
@@ -10429,7 +10429,7 @@ set_job_attrs(cupsd_client_t  *con,     /* I - Client connection */
 
          case IPP_JOB_PROCESSING :
          case IPP_JOB_STOPPED :
-             if (job->state_value != attr->values[0].integer)
+             if (job->state_value != (ipp_jstate_t)attr->values[0].integer)
              {
                send_ipp_status(con, IPP_NOT_POSSIBLE,
                                _("Job state cannot be changed."));