bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-mailutils] Compiler warnings


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] Compiler warnings
Date: Fri, 28 Apr 2017 11:55:16 +0300

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]