diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2004-07-16 07:31:06 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2004-07-16 07:31:06 +0000 |
commit | 6f601a29a8b9c452524c9894649ea301f0c67d92 (patch) | |
tree | 74aa39689554535ea9631e83603faab67a9501c3 /usr.bin/rpcgen/rpc_cout.c | |
parent | 025441e56ea9019f1050ac29115f79856c90b0a2 (diff) |
Avoid generating an unused variable. From NetBSD. ok deraadt@
Diffstat (limited to 'usr.bin/rpcgen/rpc_cout.c')
-rw-r--r-- | usr.bin/rpcgen/rpc_cout.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c index 993afa69fdc..fb717b93ff7 100644 --- a/usr.bin/rpcgen/rpc_cout.c +++ b/usr.bin/rpcgen/rpc_cout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_cout.c,v 1.17 2004/05/09 22:22:45 deraadt Exp $ */ +/* $OpenBSD: rpc_cout.c,v 1.18 2004/07/16 07:31:05 matthieu Exp $ */ /* $NetBSD: rpc_cout.c,v 1.6 1996/10/01 04:13:53 cgd Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -165,8 +165,6 @@ print_header(def) if (doinline == 0) return; - /* May cause lint to complain. but ... */ - fprintf(fout, "\tint32_t *buf;\n"); } static void @@ -458,15 +456,19 @@ emit_struct(def) can_inline = 1; if (can_inline == 0) { /* can not inline, drop back to old mode */ + fprintf(fout, "\n"); for (dl = def->def.st.decls; dl != NULL; dl = dl->next) print_stat(1, &dl->decl); return; } + /* May cause lint to complain. but ... */ + fprintf(fout, "\tint32_t *buf;\n"); + flag = PUT; for (j = 0; j < 2; j++) { if (flag == PUT) - fprintf(fout, "\tif (xdrs->x_op == XDR_ENCODE) {\n"); + fprintf(fout, "\n\tif (xdrs->x_op == XDR_ENCODE) {\n"); else fprintf(fout, "\t\treturn (TRUE);\n\t} else if (xdrs->x_op == XDR_DECODE) {\n"); |