Commit 9642ecad authored by Jack Jansen's avatar Jack Jansen

Shut up a few more gcc warnings.

parent 1767f936
...@@ -272,7 +272,7 @@ static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other) ...@@ -272,7 +272,7 @@ static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other)
static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self) static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self)
{ {
char buf[100]; char buf[100];
sprintf(buf, "<CFTypeRef type-%d object at 0x%08.8x for 0x%08.8x>", CFGetTypeID(self->ob_itself), self, self->ob_itself); sprintf(buf, "<CFTypeRef type-%d object at 0x%8.8x for 0x%8.8x>", CFGetTypeID(self->ob_itself), (unsigned long)self, (unsigned long)self->ob_itself);
return PyString_FromString(buf); return PyString_FromString(buf);
} }
......
...@@ -190,7 +190,7 @@ class MyGlobalObjectDefinition(GlobalObjectDefinition): ...@@ -190,7 +190,7 @@ class MyGlobalObjectDefinition(GlobalObjectDefinition):
Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype) Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
OutLbrace() OutLbrace()
Output("char buf[100];") Output("char buf[100];")
Output("""sprintf(buf, "<CFTypeRef type-%%d object at 0x%%08.8x for 0x%%08.8x>", CFGetTypeID(self->ob_itself), self, self->ob_itself);""") Output("""sprintf(buf, "<CFTypeRef type-%%d object at 0x%%8.8x for 0x%%8.8x>", CFGetTypeID(self->ob_itself), (unsigned long)self, (unsigned long)self->ob_itself);""")
Output("return PyString_FromString(buf);") Output("return PyString_FromString(buf);")
OutRbrace() OutRbrace()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment