]> 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:49 +0000 (09:38 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 13 Dec 2019 14:38:49 +0000 (09:38 -0500)
CHANGES.md
backend/ipp.c
backend/lpd.c

index 46bd6aa6aee4b2efe189b1e436c1088dc6a012bb..dc897cc91604562e393ed56e76c763ae8ea69081 100644 (file)
@@ -15,6 +15,7 @@ Changes in CUPS v2.2.13
 - Default printers set with `lpoptions` did not work in all cases (Issue #5681,
   Issue #5683, Issue #5684)
 - Fixed an off-by-one error in `ippEnumString` (Issue #5695)
+- 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)
index 482d6f766ecad949b4834ce8d32fe4eeee49673f..301e5cefba0230a57fa9737f7394dd9de79d976c 100644 (file)
@@ -242,7 +242,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 */
@@ -1994,7 +1993,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 accde240deea48742c21ad50687d5d246d26e0b5..3bc0e0d15dcc4cd682710e098dedac62cd5752dd 100644 (file)
@@ -1056,7 +1056,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);
@@ -1106,7 +1106,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))
       {
@@ -1189,7 +1189,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);