[CRIU] [PATCH 1/3] protobuf: replace the constant 4294967295 with 0xFFFFFFFF in generated sources
Alexander Kartashov
alekskartashov at parallels.com
Mon Jan 14 05:56:24 EST 2013
On 01/14/2013 01:46 PM, Pavel Emelyanov wrote:
> What is the warning?
This is a snipped of the code generated for packet-sock.proto:
void packet_sock_entry__init
(PacketSockEntry *message)
{
static PacketSockEntry init_value = PACKET_SOCK_ENTRY__INIT;
*message = init_value;
}
The macro PACKET_SOCK_ENTRY__INIT is declared in the following way:
#define PACKET_SOCK_ENTRY__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&packet_sock_entry__descriptor) \
, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL,
0,4294967295, NULL, NULL }
The compiler says the following when sees this:
packet-sock.pb-c.c: In function 'packet_sock_entry__init':
packet-sock.pb-c.c:98:3: error: this decimal constant is unsigned only
in ISO C90 [-Werror]
packet-sock.pb-c.c: At top level:
packet-sock.pb-c.c:318:1: error: this decimal constant is unsigned only
in ISO C90 [-Werror]
It seems it's better to fix protobuf so it doesn't generate such a code
but I'm afraid
it will take to long to settle :)
--
Sincerely yours,
Alexander Kartashov
Intern
Core team
www.parallels.com
Skype: aleksandr.kartashov
Email: alekskartashov at parallels.com
More information about the CRIU
mailing list