aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan D. Brunelle <alan.brunelle@hp.com>2008-11-12 07:11:22 -0500
committerAlan D. Brunelle <alan.brunelle@hp.com>2008-11-12 07:11:22 -0500
commitef02006b0131f298595b37afb07562ee50fae5cc (patch)
tree1632bd5cfecddce950f9529e71ede448e7f1a19e
parent0f067275d74a96ca9d574e9912a60bfa81b4df97 (diff)
downloadblktrace-ef02006b0131f298595b37afb07562ee50fae5cc.tar.gz
gcc 4.3.2 has started to warn about:
gcc -Wall -W -O2 -g -I. -I.. -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o output.o output.c output.c: In function ‘output_section_hdr’: output.c:57: warning: format not a string literal and no format arguments output.c: In function ‘__output_pip_avg’: output.c:496: warning: format not a string literal and no format arguments output.c:496: warning: format not a string literal and no format arguments so this patch cleans this up.
-rw-r--r--btt/output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/btt/output.c b/btt/output.c
index 00ffce5..c08e7da 100644
--- a/btt/output.c
+++ b/btt/output.c
@@ -54,7 +54,7 @@ ai_pip_t pip_d2c_avg(struct p_info *pip) { return &pip->avgs.d2c; }
void output_section_hdr(FILE *ofp, char *hdr)
{
fprintf(ofp, "==================== ");
- fprintf(ofp, hdr);
+ fprintf(ofp, "%s", hdr);
fprintf(ofp, " ====================\n\n");
}
@@ -493,7 +493,7 @@ void __output_pip_avg(struct p_info *pip, void *arg)
if (ap->n > 0) {
char proc_name[15];
- snprintf(proc_name, 15, pip->name);
+ snprintf(proc_name, 15, "%s", pip->name);
ap->avg = BIT_TIME(ap->total) / (double)ap->n;
__output_avg(opap->ofp, proc_name, ap, 0);