subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1464058 - in /subversion/trunk/subversion/mod_dav_svn: liveprops.c lock.c mod_dav_svn.c util.c
Date Wed, 03 Apr 2013 14:53:12 GMT
Author: philip
Date: Wed Apr  3 14:53:12 2013
New Revision: 1464058

URL: http://svn.apache.org/r1464058
Log:
Remove (void) casts of ignored return values from mod_dav_svn, add
some extra handling for parameters that could be used when errors
are ignored.

* subversion/mod_dav_svn/liveprops.c
  (is_writable): Remove cast, only dereference non-NULL pointer.
  (dav_svn__insert_all_liveprops): Remove cast.

* subversion/mod_dav_svn/lock.c
  (unescape_xml): Remove cast, initialise buffer.

* subversion/mod_dav_svn/mod_dav_svn.c
  (merge_xml_in_filter): Remove cast.

* subversion/mod_dav_svn/util.c
  (dav_svn__final_flush_or_error): Remove cast, initialise length.

Modified:
    subversion/trunk/subversion/mod_dav_svn/liveprops.c
    subversion/trunk/subversion/mod_dav_svn/lock.c
    subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/trunk/subversion/mod_dav_svn/util.c

Modified: subversion/trunk/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/liveprops.c?rev=1464058&r1=1464057&r2=1464058&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/liveprops.c Wed Apr  3 14:53:12 2013
@@ -834,10 +834,10 @@ insert_prop(const dav_resource *resource
 static int
 is_writable(const dav_resource *resource, int propid)
 {
-  const dav_liveprop_spec *info;
+  const dav_liveprop_spec *info = NULL;
 
-  (void) dav_get_liveprop_info(propid, &dav_svn__liveprop_group, &info);
-  return info->is_writable;
+  dav_get_liveprop_info(propid, &dav_svn__liveprop_group, &info);
+  return info ? info->is_writable : FALSE;
 }
 
 
@@ -962,8 +962,8 @@ dav_svn__insert_all_liveprops(request_re
   for (spec = props; spec->name != NULL; ++spec)
     {
       svn_pool_clear(iterpool);
-      (void) insert_prop_internal(resource, spec->propid, what, phdr,
-                                  resource->pool, iterpool);
+      insert_prop_internal(resource, spec->propid, what, phdr,
+                           resource->pool, iterpool);
     }
   svn_pool_destroy(iterpool);
 

Modified: subversion/trunk/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/lock.c?rev=1464058&r1=1464057&r2=1464058&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/lock.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/lock.c Wed Apr  3 14:53:12 2013
@@ -143,7 +143,9 @@ unescape_xml(const char **output,
   if (apr_err)
     {
       char errbuf[1024];
-      (void)apr_xml_parser_geterror(xml_parser, errbuf, sizeof(errbuf));
+
+      errbuf[0] = '\0';
+      apr_xml_parser_geterror(xml_parser, errbuf, sizeof(errbuf));
       return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR,
                                 DAV_ERR_LOCK_SAVE_LOCK, errbuf);
     }

Modified: subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c?rev=1464058&r1=1464057&r2=1464058&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c Wed Apr  3 14:53:12 2013
@@ -1041,7 +1041,7 @@ merge_xml_in_filter(ap_filter_t *f,
       if (rv != APR_SUCCESS)
         {
           /* Clean up the parser. */
-          (void) apr_xml_parser_done(ctx->parser, NULL);
+          apr_xml_parser_done(ctx->parser, NULL);
           break;
         }
     }

Modified: subversion/trunk/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/util.c?rev=1464058&r1=1464057&r2=1464058&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/util.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/util.c Wed Apr  3 14:53:12 2013
@@ -621,8 +621,8 @@ dav_svn__final_flush_or_error(request_re
   if (! do_flush)
     {
       /* Ask about the length of the bucket brigade, ignoring errors. */
-      apr_off_t len;
-      (void)apr_brigade_length(bb, FALSE, &len);
+      apr_off_t len = 0;
+      apr_brigade_length(bb, FALSE, &len);
       do_flush = (len != 0);
     }
 



Mime
View raw message