bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 8/8] mig/server.c (WriteVarDecls): quiet GCC warning about set bu


From: Marin Ramesa
Subject: [PATCH 8/8] mig/server.c (WriteVarDecls): quiet GCC warning about set but unused variable
Date: Wed, 11 Dec 2013 17:30:47 +0100

This is again that code where variable is assigned to itself, but
I don't know how to fix this the other way.

* server.c (WriteVarDecls) (msgh_simple): Assign to itself.

---
 server.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server.c b/server.c
index 8496da7..793b9fc 100644
--- a/server.c
+++ b/server.c
@@ -296,11 +296,11 @@ WriteVarDecls(FILE *file, const routine_t *rt)
     fprintf(file, "\n");
 
     if (!rt->rtSimpleFixedReply)
-       fprintf(file, "\tboolean_t msgh_simple;\n");
+       fprintf(file, "\tboolean_t msgh_simple = msgh_simple;\n");
     else if (!rt->rtSimpleCheckRequest)
     {
        fprintf(file, "#if\tTypeCheck\n");
-       fprintf(file, "\tboolean_t msgh_simple;\n");
+       fprintf(file, "\tboolean_t msgh_simple = msgh_simple;\n");
        fprintf(file, "#endif\t/* TypeCheck */\n");
        fprintf(file, "\n");
     }
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]