Author: philip
Date: Wed Apr  3 22:55:37 2013
New Revision: 1464228

URL: http://svn.apache.org/r1464228
Log:
Remove (void) casts of ignored return values from ra_serf.

* subversion/libsvn_ra_serf/util.c
  (svn_ra_serf__conn_closed, svn_ra_serf__process_pending,
   svn_ra_serf__handle_xml_parser, svn_ra_serf__credentials_callback,
   svn_ra_serf__request_create, expat_start, expat_end,
   expat_cdata, expat_response_handler): Remove cast.

* subversion/libsvn_ra_serf/sb_bucket.c
  (sb_bucket_readline): Remove cast, clear error to avoid any possible leak.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/sb_bucket.c
    subversion/trunk/subversion/libsvn_ra_serf/util.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/sb_bucket.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/sb_bucket.c?rev=1464228&r1=1464227&r2=1464228&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/sb_bucket.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/sb_bucket.c Wed Apr  3 22:55:37 
2013
@@ -124,7 +124,8 @@ sb_bucket_readline(serf_bucket_t *bucket
                    const char **data, apr_size_t *len)
 {
   /* ### for now, we know callers won't use this function.  */
-  (void)svn_error__malfunction(TRUE, __FILE__, __LINE__, "Not implemented.");
+  svn_error_clear(svn_error__malfunction(TRUE, __FILE__, __LINE__,
+                                         "Not implemented."));
   return APR_ENOTIMPL;
 }
 

Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1464228&r1=1464227&r2=1464228&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Wed Apr  3 22:55:37 2013
@@ -497,7 +497,7 @@ svn_ra_serf__conn_closed(serf_connection
 
   err = svn_error_trace(connection_closed(ra_conn, why, pool));
 
-  (void) save_error(ra_conn->session, err);
+  save_error(ra_conn->session, err);
 }
 
 
@@ -1490,7 +1490,7 @@ svn_ra_serf__process_pending(svn_ra_serf
 
       /* Tell the parser that no more content will be parsed. Ignore the
          return status. We just don't care.  */
-      (void) XML_Parse(parser->xmlp, NULL, 0, 1);
+      XML_Parse(parser->xmlp, NULL, 0, 1);
 
       apr_pool_cleanup_run(parser->pool, &parser->xmlp, xml_parser_cleanup);
       parser->xmlp = NULL;
@@ -1711,7 +1711,7 @@ svn_ra_serf__handle_xml_parser(serf_requ
               SVN_ERR_ASSERT(ctx->xmlp != NULL);
 
               /* Ignore the return status. We just don't care.  */
-              (void) XML_Parse(ctx->xmlp, NULL, 0, 1);
+              XML_Parse(ctx->xmlp, NULL, 0, 1);
 
               apr_pool_cleanup_run(ctx->pool, &ctx->xmlp, xml_parser_cleanup);
               add_done_item(ctx);
@@ -1763,7 +1763,7 @@ svn_ra_serf__credentials_callback(char *
 
       if (err)
         {
-          (void) save_error(session, err);
+          save_error(session, err);
           return err->apr_err;
         }
 
@@ -1772,8 +1772,8 @@ svn_ra_serf__credentials_callback(char *
       if (!creds || session->auth_attempts > 4)
         {
           /* No more credentials. */
-          (void) save_error(session,
-                            svn_error_create(
+          save_error(session,
+                     svn_error_create(
                               SVN_ERR_AUTHN_FAILED, NULL,
                               _("No more credentials or we tried too many "
                                 "times.\nAuthentication failed")));
@@ -1794,8 +1794,8 @@ svn_ra_serf__credentials_callback(char *
       if (!session->proxy_username || session->proxy_auth_attempts > 4)
         {
           /* No more credentials. */
-          (void) save_error(session, 
-                            svn_error_create(
+          save_error(session, 
+                     svn_error_create(
                               SVN_ERR_AUTHN_FAILED, NULL,
                               _("Proxy authentication failed")));
           return SVN_ERR_AUTHN_FAILED;
@@ -2217,8 +2217,8 @@ svn_ra_serf__request_create(svn_ra_serf_
 
   /* ### do we need to hold onto the returned request object, or just
      ### not worry about it (the serf ctx will manage it).  */
-  (void) serf_connection_request_create(handler->conn->conn,
-                                        setup_request_cb, handler);
+  serf_connection_request_create(handler->conn->conn,
+                                 setup_request_cb, handler);
 }
 
 
@@ -2446,7 +2446,7 @@ expat_start(void *userData, const char *
 
 #ifdef EXPAT_HAS_STOPPARSER
   if (ectx->inner_error)
-    (void) XML_StopParser(ectx->parser, 0 /* resumable */);
+    XML_StopParser(ectx->parser, 0 /* resumable */);
 #endif
 }
 
@@ -2465,7 +2465,7 @@ expat_end(void *userData, const char *ra
 
 #ifdef EXPAT_HAS_STOPPARSER
   if (ectx->inner_error)
-    (void) XML_StopParser(ectx->parser, 0 /* resumable */);
+    XML_StopParser(ectx->parser, 0 /* resumable */);
 #endif
 }
 
@@ -2484,7 +2484,7 @@ expat_cdata(void *userData, const char *
 
 #ifdef EXPAT_HAS_STOPPARSER
   if (ectx->inner_error)
-    (void) XML_StopParser(ectx->parser, 0 /* resumable */);
+    XML_StopParser(ectx->parser, 0 /* resumable */);
 #endif
 }
 
@@ -2570,7 +2570,7 @@ expat_response_handler(serf_request_t *r
         {
           /* Tell expat we've reached the end of the content. Ignore the
              return status. We just don't care.  */
-          (void) XML_Parse(ectx->parser, NULL, 0, 1 /* isFinal */);
+          XML_Parse(ectx->parser, NULL, 0, 1 /* isFinal */);
 
           svn_ra_serf__xml_context_destroy(ectx->xmlctx);
           apr_pool_cleanup_run(ectx->cleanup_pool, &ectx->parser,


Reply via email to