Hello,

Flávio Cruz, on Tue 19 Apr 2016 02:11:50 +0200, wrote:
> I fully understand your worries about changing the ABI :) However, it could be
> nice to have a separate branch with ABI changes that could be incorporated 
> into
> a major release.

We can do that, yes.

> The warning I'm talking about is the following:
> 
> In file included from ipc/mach_port.server.c:10:0:
> ipc/mach_port.server.c: In function '_Xmach_port_extract_right':
> ../gnumach/include/mach/message.h:268:35: warning: large integer implicitly
> truncated to unsigned type [-Woverflow]
>  #define MACH_MSG_TYPE_POLYMORPHIC ((mach_msg_type_name_t) -1)
>                                    ^
> ipc/mach_port.server.c:1355:22: note: in expansion of macro
> 'MACH_MSG_TYPE_POLYMORPHIC'
>    /* msgt_name = */  MACH_MSG_TYPE_POLYMORPHIC,
>                       ^

Ok, I see.

> This shows when compiling some stubs since now mig generates code with
> MACH_MSG_TYPE_POLYMORPHIC instead of -1.
> I think this can be trivially fixed by removing the cast in
> MACH_MSG_TYPE_POLYMORPHIC.

But that will probably lead to other issues, because
MACH_MSG_TYPE_POLYMORPHIC would then be a signed value instead of an
unsigned value.

I'd say that we could add a cast here: MACH_MSG_TYPE_POLYMORPHIC is
meant to be of type mach_msg_type_name_t, and the code above squeezes it
into an 8-bit value. So the code could be casting it into (unsigned
char) this way:

fprintf(file, "\t\t/* msgt_name = */\t\t(unsigned char) %s,\n", 
it->itOutNameStr);

Samuel

Reply via email to