On Aug 21, 2006, at 10:34 AM, Thomas Wouters wrote:
>
> Is there a simple automated way to detect situations like this? Maybe
> there is a win64 compiler that would generate a warning.
>
> I doubt it. Explicit casts are meant to silence warnings (among
> other things.) Warning for all casts is bound to generate quite a
> lot of warnings.
>
There are also cases of implicit casts like this that were not
caught so far:
static Py_ssize_t
mmap_buffer_getreadbuf(mmap_object *self, Py_ssize_t index, const
void **ptr)
{
...
return self->size;
}
static Py_ssize_t
mmap_buffer_getwritebuf(mmap_object *self, Py_ssize_t index, const
void **ptr)
{
...
return self->size;
}
I don't have any system with sizeof(size_t) != sizeof(long), but it
maybe worth the effort to review the warnings on such system.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com