[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Drop the auto keyword
From: |
Justus Winter |
Subject: |
[PATCH] Drop the auto keyword |
Date: |
Fri, 29 Nov 2013 01:02:40 +0100 |
Drop the auto keyword from the generated source code. auto is the
default storage type for variables anyway and it is customary to omit
it.
* utils.c (WriteCheckDecl): Drop auto from generated source.
(WriteStaticLongDecl): Likewise.
(WriteStaticShortDecl): Likewise.
---
utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/utils.c b/utils.c
index 4feb874..6c42bc3 100644
--- a/utils.c
+++ b/utils.c
@@ -181,7 +181,7 @@ WriteCheckDecl(FILE *file, const argument_t *arg)
Note we use itOutNameStr instead of itInNameStr, because
this declaration will be used to check received types. */
- fprintf(file, "\tauto const mach_msg_type_t %sCheck = {\n",
+ 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_size = */\t\t%d,\n", it->itSize);
@@ -261,7 +261,7 @@ static void
WriteStaticLongDecl(FILE *file, const ipc_type_t *it,
dealloc_t dealloc, boolean_t inname, identifier_t name)
{
- fprintf(file, "\tauto const mach_msg_type_long_t %s = {\n", name);
+ fprintf(file, "\tconst mach_msg_type_long_t %s = {\n", name);
fprintf(file, "\t{\n");
fprintf(file, "\t\t/* msgt_name = */\t\t0,\n");
fprintf(file, "\t\t/* msgt_size = */\t\t0,\n");
@@ -284,7 +284,7 @@ static void
WriteStaticShortDecl(FILE *file, const ipc_type_t *it,
dealloc_t dealloc, boolean_t inname, identifier_t name)
{
- fprintf(file, "\tauto const mach_msg_type_t %s = {\n", name);
+ fprintf(file, "\tconst mach_msg_type_t %s = {\n", name);
fprintf(file, "\t\t/* msgt_name = */\t\t%s,\n",
inname ? it->itInNameStr : it->itOutNameStr);
fprintf(file, "\t\t/* msgt_size = */\t\t%d,\n", it->itSize);
--
1.7.10.4
- Implementing protected payloads in GNU Mach, mig, and the Hurd, Justus Winter, 2013/11/29
- [PATCH 1/8] include: skip routines related to migrating threads, Justus Winter, 2013/11/28
- [PATCH 4/8] include: add msgh_protected_payload to mach_msg_header_t, Justus Winter, 2013/11/28
- [PATCH 3/8] ipc: implement mach_port_set_protected_payload, Justus Winter, 2013/11/28
- [PATCH 2/8] ipc: add protected payload, Justus Winter, 2013/11/28
- [PATCH 5/8] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD, Justus Winter, 2013/11/28
- [PATCH 6/8] ipc: provide the protected payload in ipc_kmsg_copyout_header, Justus Winter, 2013/11/28
- [PATCH 7/8] ipc: clear the payload when moving a receive port, Justus Winter, 2013/11/28
- [PATCH 8/8] XXX fix the size of ipc_port structs, Justus Winter, 2013/11/28
- [PATCH 1/5] Advise flex not to generate the input function, Justus Winter, 2013/11/28
- [PATCH 01/23] trans: fix the receiver lookup in password, Justus Winter, 2013/11/28