/* Now the decoding is done, rest is just to print stuff out. */
printf("name: \"%s\"\n", person.name);
- printf("id: %d\n", person.id);
+ printf("id: %ld\n", (long)person.id);
if (person.has_email)
printf("email: \"%s\"\n", person.email);
if (!pb_decode_varint(stream, &value))
return false;
- printf((char*)arg, (int32_t)value);
+ printf((char*)arg, (long)value);
return true;
}
if (!pb_dec_fixed32(stream, NULL, &value))
return false;
- printf((char*)arg, value);
+ printf((char*)arg, (long)value);
return true;
}
if (!pb_dec_fixed64(stream, NULL, &value))
return false;
- printf((char*)arg, value);
+ printf((char*)arg, (long long)value);
return true;
}
testmessage.submsg.stringvalue.funcs.decode = &print_string;
testmessage.submsg.stringvalue.arg = "submsg {\n stringvalue: \"%s\"\n";
testmessage.submsg.int32value.funcs.decode = &print_int32;
- testmessage.submsg.int32value.arg = " int32value: %d\n";
+ testmessage.submsg.int32value.arg = " int32value: %ld\n";
testmessage.submsg.fixed32value.funcs.decode = &print_fixed32;
- testmessage.submsg.fixed32value.arg = " fixed32value: %d\n";
+ testmessage.submsg.fixed32value.arg = " fixed32value: %ld\n";
testmessage.submsg.fixed64value.funcs.decode = &print_fixed64;
testmessage.submsg.fixed64value.arg = " fixed64value: %lld\n}\n";
testmessage.stringvalue.funcs.decode = &print_string;
testmessage.stringvalue.arg = "stringvalue: \"%s\"\n";
testmessage.int32value.funcs.decode = &print_int32;
- testmessage.int32value.arg = "int32value: %d\n";
+ testmessage.int32value.arg = "int32value: %ld\n";
testmessage.fixed32value.funcs.decode = &print_fixed32;
- testmessage.fixed32value.arg = "fixed32value: %d\n";
+ testmessage.fixed32value.arg = "fixed32value: %ld\n";
testmessage.fixed64value.funcs.decode = &print_fixed64;
testmessage.fixed64value.arg = "fixed64value: %lld\n";