mirror of https://github.com/python/cpython.git
Shut up a few more gcc warnings.
This commit is contained in:
parent
1767f93603
commit
9642ecad06
|
@ -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 @@ def outputRepr(self):
|
||||||
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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue