]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix compiler warning - count uninitialized, and return value never used in
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 11 May 2011 19:59:56 +0000 (19:59 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 11 May 2011 19:59:56 +0000 (19:59 +0000)
report_printer_state...

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9765 7a7537e8-13f0-0310-91df-b6672ffda945

backend/ipp.c

index 1ef458e2bbbedfe9b3f8038c3801a879a015a736..68c9268ac05c3c50f6c2a4558939743cda97905e 100644 (file)
@@ -157,7 +157,7 @@ static ipp_t                *new_request(ipp_op_t op, int version, const char *uri,
                                     ipp_attribute_t *doc_handling_sup);
 static const char      *password_cb(const char *);
 static void            report_attr(ipp_attribute_t *attr);
-static int             report_printer_state(ipp_t *ipp, int job_id);
+static void            report_printer_state(ipp_t *ipp, int job_id);
 #if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
 static int             run_as_user(int argc, char *argv[], uid_t uid,
                                    const char *device_uri, int fd);
@@ -2421,11 +2421,10 @@ report_attr(ipp_attribute_t *attr)      /* I - Attribute */
  * 'report_printer_state()' - Report the printer state.
  */
 
-static int                             /* O - Number of reasons shown */
+static void
 report_printer_state(ipp_t *ipp,       /* I - IPP response */
                      int   job_id)     /* I - Current job ID */
 {
-  int                  count;          /* Count of reasons shown... */
   ipp_attribute_t      *pa,            /* printer-alert */
                        *pam,           /* printer-alert-message */
                        *psm,           /* printer-state-message */
@@ -2486,7 +2485,7 @@ report_printer_state(ipp_t *ipp,  /* I - IPP response */
 
   if ((reasons = ippFindAttribute(ipp, "printer-state-reasons",
                                   IPP_TAG_KEYWORD)) == NULL)
-    return (0);
+    return;
 
   update_reasons(reasons, NULL);
 
@@ -2531,8 +2530,6 @@ report_printer_state(ipp_t *ipp,  /* I - IPP response */
                                    IPP_TAG_KEYWORD)) != NULL)
       report_attr(marker);
   }
-
-  return (count);
 }