diff --git a/sysdeps/linux/fsusage.c b/sysdeps/linux/fsusage.c index 559ba1f9..13564948 100644 --- a/sysdeps/linux/fsusage.c +++ b/sysdeps/linux/fsusage.c @@ -140,7 +140,7 @@ static void linux_2_6_0(glibtop *server, glibtop_fsusage *buf, const char *path) get_sys_path(server, device, &filename, &format); - ret = try_file_to_buffer(buffer, sizeof buffer, filename); + ret = try_file_to_buffer(buffer, sizeof buffer, "%s", filename); if (ret < 0) goto out; diff --git a/sysdeps/linux/glibtop_private.c b/sysdeps/linux/glibtop_private.c index 041624c7..52c3782c 100644 --- a/sysdeps/linux/glibtop_private.c +++ b/sysdeps/linux/glibtop_private.c @@ -124,7 +124,7 @@ int try_file_to_buffer(char *buffer, size_t bufsiz, const char *format, ...) void file_to_buffer(glibtop *server, char *buffer, size_t bufsiz, const char *filename) { - switch(try_file_to_buffer(buffer, bufsiz, filename)) + switch(try_file_to_buffer(buffer, bufsiz, "%s", filename)) { case TRY_FILE_TO_BUFFER_OPEN: glibtop_error_io_r (server, "open (%s)", filename);