This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] fix -Wformat warnings in rpcgen code
- From: Roland McGrath <roland at hack dot frob dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 26 Jul 2012 15:03:59 -0700 (PDT)
- Subject: [COMMITTED PATCH] fix -Wformat warnings in rpcgen code
Committed as obvious enough.
2012-07-26 Roland McGrath <roland@hack.frob.com>
* sunrpc/rpc_hout.c (pdeclaration): Call f_print with a "%s" format
rather than a string variable.
* sunrpc/rpc_main.c (h_output): Likewise.
* sunrpc/rpc_svcout.c (write_real_program): Likewise.
diff --git a/sunrpc/rpc_hout.c b/sunrpc/rpc_hout.c
index 31b6d3a..10f793d 100644
--- a/sunrpc/rpc_hout.c
+++ b/sunrpc/rpc_hout.c
@@ -579,7 +579,7 @@ pdeclaration (const char *name, declaration * dec, int tab,
break;
}
}
- f_print (fout, separator);
+ f_print (fout, "%s", separator);
}
static int
diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c
index 3096455..06d951a 100644
--- a/sunrpc/rpc_main.c
+++ b/sunrpc/rpc_main.c
@@ -643,7 +643,7 @@ h_output (const char *infile, const char *define, int extend,
}
else if (tblflag)
{
- fprintf (fout, rpcgen_table_dcl);
+ fprintf (fout, "%s", rpcgen_table_dcl);
}
if (Cflag)
diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c
index be234ae..4f12a81 100644
--- a/sunrpc/rpc_svcout.c
+++ b/sunrpc/rpc_svcout.c
@@ -353,7 +353,7 @@ write_real_program (const definition * def)
f_print (fout, " (");
/* arg name */
if (proc->arg_num > 1)
- f_print (fout, proc->args.argname);
+ f_print (fout, "%s", proc->args.argname);
else
ptype (proc->args.decls->decl.prefix,
proc->args.decls->decl.type, 0);