Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.14.1
-
None
Description
The Protocol's Type Message ENUM is inconsistent with "printf" for c_glib and might be in some cases for C++.
The issue can be seen at compiling with the flag " -Wformat-signedness".
Looks like all the printf use "%d" signed-i32 - in order to keep it consistent. It be better to have enum of type int32_t or unsigned with printf to be changed to "%u" - or further more reduce it to uint8_t (unless Message Type needs to be reserved for growing in future)
The printf cases can be found at https://github.com/apache/thrift/search?q="invalid+message+type+%25d%2C"&type=code
The corresponding ENUMs are the:
enum TMessageType {
T_CALL = 1,
T_REPLY = 2,
T_EXCEPTION = 3,
T_ONEWAY = 4
};
typedef enum { T_CALL = 1, T_REPLY = 2, T_EXCEPTION = 3, T_ONEWAY = 4 } ThriftMessageType;
I'm willing to make a pull-request, Just I would like first to know if there are any preferences/considerations on the subject.