[Xcb-commit] libxcb: src

Christian Linhart clinhart at kemper.freedesktop.org
Sun Mar 15 02:22:43 PDT 2015


 src/c_client.py |   12 ------------
 1 file changed, 12 deletions(-)

New commits:
commit 70d32ce7d8ef3ce9490d9a51b189829c8bcdb5c4
Author: Ran Benita <ran234 at gmail.com>
Date:   Sun Oct 12 21:58:05 2014 +0300

    c_client.py: fix pyflakes errors
    
    c_client.py:2: 'from xml.etree.cElementTree import *' used; unable to detect undefined names
    c_client.py:3: 'basename' imported but unused
    c_client.py:9: 'time' imported but unused
    c_client.py:1437: local variable 'list_obj' is assigned to but never used
    c_client.py:1745: local variable 'varfield' is assigned to but never used
    c_client.py:2050: local variable 'length' is assigned to but never used
    c_client.py:2416: local variable 'R_obj' is assigned to but never used
    c_client.py:2441: local variable 'S_obj' is assigned to but never used
    
    Signed-off-by: Ran Benita <ran234 at gmail.com>
    Reviewed-by: Christian Linhart <chris at demorecorder.com>

diff --git a/src/c_client.py b/src/c_client.py
index b5d3cf2..2537f80 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -1,12 +1,9 @@
 #!/usr/bin/env python
-from xml.etree.cElementTree import *
-from os.path import basename
 from functools import reduce
 import getopt
 import os
 import sys
 import errno
-import time
 import re
 
 # Jump to the bottom of this file for the main routine
@@ -1670,7 +1667,6 @@ def _c_accessor_get_expr(expr, field_mapping):
         return c_name
     elif expr.op == 'sumof':
         # locate the referenced list object
-        list_obj = expr.lenfield_type
         field = None
         for f in expr.lenfield_parent.fields:
             if f.field_name == expr.lenfield_name:
@@ -2069,10 +2065,8 @@ def _c_complex(self, force_packed = False):
     struct_fields = []
     maxtypelen = 0
 
-    varfield = None
     for field in self.fields:
         if not field.type.fixed_size() and not self.is_switch and not self.is_union:
-            varfield = field.c_field_name
             continue
         if field.wire:
             struct_fields.append(field)
@@ -2377,7 +2371,6 @@ def _c_request_helper(self, name, cookie_type, void, regular, aux=False, reply_f
                         else:
                             list_length = _c_accessor_get_expr(field.type.expr, None)
 
-                            length = ''
                             _c("    xcb_parts[%d].iov_len = 0;" % count)
                             _c("    xcb_tmp = (char *)%s;", field.c_field_name)
                             _c("    for(i=0; i<%s; i++) {" % list_length)
@@ -2742,8 +2735,6 @@ def _man_request(self, name, cookie_type, void, aux):
             # 'R': parents[0] is always the 'toplevel' container type
             params.append(('const %s *\\fIreply\\fP' % parents[0].c_type, parents[0]))
             fields.update(_c_helper_field_mapping(parents[0], [('R', '->', parents[0])], flat=True))
-            # auxiliary object for 'R' parameters
-            R_obj = parents[0]
 
             if switch_obj is not None:
                 # now look where the fields are defined that are needed to evaluate
@@ -2767,9 +2758,6 @@ def _man_request(self, name, cookie_type, void, aux):
                         prefix.append((p.name[-1], '.', p))
                     fields.update(_c_helper_field_mapping(p, prefix, flat=True))
 
-                # auxiliary object for 'S' parameter
-                S_obj = parents[1]
-
             if list.member.fixed_size():
                 idx = 1 if switch_obj is not None else 0
                 f.write('.HP\n')


More information about the xcb-commit mailing list