diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-10 22:52:18 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-10 22:52:18 +0200 |
commit | cef4cac43cbf9f8b7794fb119e3b4cbcb96ac421 (patch) | |
tree | 6154d3c146367585e0ea44c6721af5156c2359a4 /utils.c | |
parent | 1b48497badb979f5c2fe0148d62c16ca4062c0b8 (diff) | |
download | mig-cef4cac43cbf9f8b7794fb119e3b4cbcb96ac421.tar.gz mig-cef4cac43cbf9f8b7794fb119e3b4cbcb96ac421.tar.bz2 mig-cef4cac43cbf9f8b7794fb119e3b4cbcb96ac421.zip |
Fix spurious warning on MACH_MSG_TYPE_POLYMORPHIC value
* utils.c (WriteCheckDecl, WriteStaticShortDecl): Explicitly cast name to
unsigned char to ignore truncation of MACH_MSG_TYPE_POLYMORPHIC i.e. -1.
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -188,7 +188,7 @@ WriteCheckDecl(FILE *file, const argument_t *arg) fprintf(file, "\tconst mach_msg_type_t %sCheck = {\n", arg->argVarName); - fprintf(file, "\t\t/* msgt_name = */\t\t%s,\n", it->itOutNameStr); + fprintf(file, "\t\t/* msgt_name = */\t\t(unsigned char) %s,\n", it->itOutNameStr); fprintf(file, "\t\t/* msgt_size = */\t\t%d,\n", it->itSize); fprintf(file, "\t\t/* msgt_number = */\t\t%d,\n", it->itNumber); fprintf(file, "\t\t/* msgt_inline = */\t\t%s,\n", @@ -296,7 +296,7 @@ WriteStaticShortDecl(FILE *file, const ipc_type_t *it, dealloc_t dealloc, boolean_t inname, identifier_t name) { fprintf(file, "\tconst mach_msg_type_t %s = {\n", name); - fprintf(file, "\t\t/* msgt_name = */\t\t%s,\n", + fprintf(file, "\t\t/* msgt_name = */\t\t(unsigned char) %s,\n", inname ? it->itInNameStr : it->itOutNameStr); fprintf(file, "\t\t/* msgt_size = */\t\t%d,\n", it->itSize); fprintf(file, "\t\t/* msgt_number = */\t\t%d,\n", it->itNumber); |