Re: Compiler warnings
Sergey Poznyakoff <[email protected]>
| Newsgroups | gmane.comp.gnu.mailutils.bugs |
|---|---|
| Organization | GNU.org.ua |
| Message-ID | <[email protected]> |
Hi Ken,
> Yes, I realize they're different types. Otherwise, my patch wouldn't
> get rid of the compiler warning.
>
> Do you have a different suggestion as to how to avoid the compiler
> warning? I thought using intptr_t was the standard way of dealing
> with this.
Well, yes (assuming C99, of course). For copyfile.c, the double
type-cast will do:
if (fchmod ((int) (intptr_t) trans[0], mode))
Another (and, arguably more portable) way would be to change the
mu_transport_t to point to a union { void *; int; }. I haven't
decided yet what way to choose.
Regards,
Sergey