summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2014-10-12 21:58:05 +0300
committerChristian Linhart <chris@demorecorder.com>2015-03-15 10:22:38 +0100
commit70d32ce7d8ef3ce9490d9a51b189829c8bcdb5c4 (patch)
tree2e9f8dfd5f4b57d5da1a2798c2d84ddb37d444d5
parent12d23b934f189607ad77667834205dfcf89a41f0 (diff)
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@gmail.com> Reviewed-by: Christian Linhart <chris@demorecorder.com>
-rw-r--r--src/c_client.py12
1 files changed, 0 insertions, 12 deletions
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')