[libxml2] Remove unused variable in xmlCharEncOutFunc



commit b92b16f659bcafa3e9ddb635ba82d719deb8562a
Author: David King <dking redhat com>
Date:   Wed May 19 10:15:54 2021 +0100

    Remove unused variable in xmlCharEncOutFunc
    
    Fixes a compiler warning:
    
    encoding.c: In function 'xmlCharEncOutFunc__internal_alias':
    encoding.c:2632:9: warning: unused variable 'output' [-Wunused-variable]
     2632 |     int output = 0;
    
    https://gitlab.gnome.org/GNOME/libxml2/-/issues/254

 encoding.c | 3 ---
 1 file changed, 3 deletions(-)
---
diff --git a/encoding.c b/encoding.c
index cdff6ae7..5e50c153 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2629,7 +2629,6 @@ xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
     int written;
     int writtentot = 0;
     int toconv;
-    int output = 0;
 
     if (handler == NULL) return(-1);
     if (out == NULL) return(-1);
@@ -2682,8 +2681,6 @@ retry:
         ret = -3;
     }
 
-    if (ret >= 0) output += ret;
-
     /*
      * Attempt to handle error cases
      */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]