[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars.
From: |
Flavio Cruz |
Subject: |
[PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars. |
Date: |
Sun, 3 Apr 2016 16:12:48 +0200 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
mach_msg_type_name_t and mach_msg_type_size_t are used as 8 bit fields in
mach_msg_type_t struct, therefore they should be treated as unsigned char's to
avoid warnings when using macros such as MACH_MSG_TYPE_POLYMORPIC.
* include/mach/message.h: Update typedef.
* include/mach/std_types.defs: Change to char.
---
include/mach/message.h | 4 ++--
include/mach/std_types.defs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/mach/message.h b/include/mach/message.h
index 0a7297e..57b81c3 100644
--- a/include/mach/message.h
+++ b/include/mach/message.h
@@ -188,8 +188,8 @@ typedef struct {
* a mach_msg_type_long_t should be zero.
*/
-typedef unsigned int mach_msg_type_name_t;
-typedef unsigned int mach_msg_type_size_t;
+typedef unsigned char mach_msg_type_name_t;
+typedef unsigned char mach_msg_type_size_t;
typedef natural_t mach_msg_type_number_t;
typedef struct {
diff --git a/include/mach/std_types.defs b/include/mach/std_types.defs
index a1f156d..d70e970 100644
--- a/include/mach/std_types.defs
+++ b/include/mach/std_types.defs
@@ -75,7 +75,7 @@ type mach_port_mscount_t = unsigned;
type mach_port_msgcount_t = unsigned;
type mach_port_rights_t = unsigned;
type mach_msg_id_t = integer_t;
-type mach_msg_type_name_t = unsigned;
+type mach_msg_type_name_t = char;
type mach_msg_type_number_t = natural_t;
type mach_port_move_receive_t = MACH_MSG_TYPE_MOVE_RECEIVE
--
2.7.0
- [PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars.,
Flavio Cruz <=
- Re: [PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars., Samuel Thibault, 2016/04/04
- Re: [PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars., Justus Winter, 2016/04/04
- Re: [PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars., Flavio Cruz, 2016/04/04
- Re: [PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars., Samuel Thibault, 2016/04/10
- Re: [PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars., Flávio Cruz, 2016/04/18
- Re: [PATCH] Turn mach_msg_type_{name,size}_t into unsigned chars., Samuel Thibault, 2016/04/24