From 15d9a95c95de72ee150ada4b78ff536c28c714de Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Sun, 18 Apr 2010 00:23:00 +0200 Subject: [PATCH] solve printf warning --- src/linux.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux.cc b/src/linux.cc index dd7773d1..39ee545d 100644 --- a/src/linux.cc +++ b/src/linux.cc @@ -2395,7 +2395,7 @@ void print_distribution(struct text_object *obj, char *p, int p_max_size) if(buf[i-1] == '(' && buf[i] >= 'A' && buf[i] <= 'Z') break; } if(i < bytes_read) { - snprintf(p, p_max_size, &buf[i]); + snprintf(p, p_max_size, "%s", &buf[i]); for(i=1; p[i]; i++) { if(p[i-1] == ' ' && p[i] >= '0' && p[i] <= '9') { p[i-1] = 0;