summaryrefslogtreecommitdiff
path: root/src/readahead/readahead-analyze.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-25 20:10:57 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-25 21:50:48 -0400
commit406e86fdd59946641737ef9d4df3bfd46c6e23c6 (patch)
tree948f079429202a54077326c946cbdad990cb445d /src/readahead/readahead-analyze.c
parente4d2bfdd73648f4b2bce123b6425d3e63bb99f33 (diff)
readahead: fix format string issue
(struct stat).st is off_t, which usually is a long, or a long long. There's no good format string modifier for it, so use a cast.
Diffstat (limited to 'src/readahead/readahead-analyze.c')
-rw-r--r--src/readahead/readahead-analyze.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/readahead/readahead-analyze.c b/src/readahead/readahead-analyze.c
index f409b2f7ac..76db3cb7e4 100644
--- a/src/readahead/readahead-analyze.c
+++ b/src/readahead/readahead-analyze.c
@@ -105,7 +105,7 @@ int main_analyze(const char *pack_path) {
}
if (stat(path, &st) == 0) {
- size_t size;
+ off_t size;
if (sections == 0)
size = st.st_size;
@@ -114,11 +114,11 @@ int main_analyze(const char *pack_path) {
tsize += size;
- printf(" %4zd%% (%2d) %12zd: %s\n",
- sections && st.st_size ? size * 100 / st.st_size : 100,
- sections ? sections : 1,
- size,
- path);
+ printf(" %4jd%% (%2d) %12jd: %s\n",
+ (intmax_t) (sections && st.st_size ? size * 100 / st.st_size : 100),
+ sections ? sections : 1,
+ (intmax_t) size,
+ path);
} else {
printf(" %4dp (%2d) %12s: %s (MISSING)\n",
sections ? pages : -1,