]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix some new compiler warnings (Issue #5700)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 13 Dec 2019 14:38:13 +0000 (09:38 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 13 Dec 2019 14:38:13 +0000 (09:38 -0500)
CHANGES.md
backend/ipp.c
backend/lpd.c

index 78ca1f98a8bc4f707679b14a96a3fb97f81229fe..5959407ea3e6fc69d9acb35483b7e4a8bf022d5d 100644 (file)
@@ -31,8 +31,9 @@ Changes in CUPS v2.3.1
   Issue #5683, Issue #5684)
 - Fixed an error in the jobs web interface template (Issue #5694)
 - Fixed an off-by-one error in `ippEnumString` (Issue #5695)
-- The IPP backend did not detect all cases where a job should be retried using
+- Fixed some new compiler warnings (Issue #5700)
 - Fixed a few issues with the Apple Raster support (rdar://55301114)
+- The IPP backend did not detect all cases where a job should be retried using
   a raster format (rdar://56021091)
 - Fixed spelling of "fold-accordion".
 - Fixed the default common name for TLS certificates used by `ippeveprinter`.
index 60a4ef20f6d86ff558d1dfd49709187c2f8c67c6..3f3e1867d3efb0b631b743a28b5a62e701386e31 100644 (file)
@@ -233,7 +233,6 @@ main(int  argc,                             /* I - Number of command-line args */
   int          waitjob,                        /* Wait for job complete? */
                waitjob_tries = 0,      /* Number of times we've waited */
                waitprinter;            /* Wait for printer ready? */
-  time_t       waittime;               /* Wait time for held jobs */
   _cups_monitor_t monitor;             /* Monitoring data */
   ipp_attribute_t *job_id_attr;                /* job-id attribute */
   int          job_id;                 /* job-id value */
@@ -2009,7 +2008,7 @@ main(int  argc,                           /* I - Number of command-line args */
 
     _cupsLangPrintFilter(stderr, "INFO", _("Waiting for job to complete."));
 
-    for (delay = _cupsNextDelay(0, &prev_delay), waittime = time(NULL) + 30; !job_canceled;)
+    for (delay = _cupsNextDelay(0, &prev_delay); !job_canceled;)
     {
      /*
       * Check for side-channel requests...
index efc7a9acc29b87362be3eaed1f6ab6d0da5a1523..c4aab8b989a6159c5a3e931c1757d3a14cc43813 100644 (file)
@@ -1046,7 +1046,7 @@ lpd_queue(const char      *hostname,      /* I - Host to connect to */
       * Send the control file...
       */
 
-      if (lpd_command(fd, "\002%d cfA%03.3d%.15s\n", (int)strlen(control),
+      if (lpd_command(fd, "\002%d cfA%03d%.15s\n", (int)strlen(control),
                       (int)getpid() % 1000, localhost))
       {
        close(fd);
@@ -1096,7 +1096,7 @@ lpd_queue(const char      *hostname,      /* I - Host to connect to */
       * Send the print file...
       */
 
-      if (lpd_command(fd, "\003" CUPS_LLFMT " dfA%03.3d%.15s\n",
+      if (lpd_command(fd, "\003" CUPS_LLFMT " dfA%03d%.15s\n",
                       CUPS_LLCAST filestats.st_size, (int)getpid() % 1000,
                      localhost))
       {
@@ -1179,7 +1179,7 @@ lpd_queue(const char      *hostname,      /* I - Host to connect to */
       * Send control file...
       */
 
-      if (lpd_command(fd, "\002%d cfA%03.3d%.15s\n", (int)strlen(control),
+      if (lpd_command(fd, "\002%d cfA%03d%.15s\n", (int)strlen(control),
                       (int)getpid() % 1000, localhost))
       {
        close(fd);