From: Jack Jansen Date: Tue, 4 Sep 2001 22:25:47 +0000 (+0000) Subject: Shut up a few more gcc warnings. X-Git-Tag: v2.2a3~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9642ecad06f596b3eded6fb2e683d95a4d1b911c;p=python Shut up a few more gcc warnings. --- diff --git a/Mac/Modules/cf/_CFmodule.c b/Mac/Modules/cf/_CFmodule.c index 24083bff0b..124f9dc505 100644 --- a/Mac/Modules/cf/_CFmodule.c +++ b/Mac/Modules/cf/_CFmodule.c @@ -272,7 +272,7 @@ static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other) static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self) { char buf[100]; - sprintf(buf, "", CFGetTypeID(self->ob_itself), self, self->ob_itself); + sprintf(buf, "", CFGetTypeID(self->ob_itself), (unsigned long)self, (unsigned long)self->ob_itself); return PyString_FromString(buf); } diff --git a/Mac/Modules/cf/cfsupport.py b/Mac/Modules/cf/cfsupport.py index f6fdaea3cf..18361feae9 100644 --- a/Mac/Modules/cf/cfsupport.py +++ b/Mac/Modules/cf/cfsupport.py @@ -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, "", CFGetTypeID(self->ob_itself), self, self->ob_itself);""") + Output("""sprintf(buf, "", CFGetTypeID(self->ob_itself), (unsigned long)self, (unsigned long)self->ob_itself);""") Output("return PyString_FromString(buf);") OutRbrace()