Shut up a few more gcc warnings.

This commit is contained in:
Jack Jansen 2001-09-04 22:25:47 +00:00
parent 1767f93603
commit 9642ecad06
2 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,7 @@ static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other)
static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self)
{
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);
}

View File

@ -190,7 +190,7 @@ class MyGlobalObjectDefinition(GlobalObjectDefinition):
Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype)
OutLbrace()
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);")
OutRbrace()