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


Reply via email to