From 7c5bb6541a820dd4721358226ca3815d94736863 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 2 Jul 2012 14:00:45 -0700 Subject: Cast enum vaules to integers and cast them back where appropraite to prevent mixed enumeration type compiler warnings --- generator/nanopb_generator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'generator/nanopb_generator.py') diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 9e2a30ed..1925167f 100644 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -217,10 +217,10 @@ class Field: prev_field_name is the name of the previous field or None. ''' result = ' {%d, ' % self.tag - result += self.htype + result += '(pb_type_t) ((int) ' + self.htype if self.ltype is not None: - result += ' | ' + self.ltype - result += ',\n' + result += ' | (int) ' + self.ltype + result += '),\n' if prev_field_name is None: result += ' offsetof(%s, %s),' % (self.struct_name, self.name) -- cgit 1.2.3-korg