From c88545d27271a15795ba12489939f173351d85d6 Mon Sep 17 00:00:00 2001 From: James Antill Date: Wed, 16 Jul 2014 00:45:13 -0400 Subject: [PATCH] Fix 64bit problem when int != gsize to printf. --- src/rpmostree-builtin-rpm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rpmostree-builtin-rpm.c b/src/rpmostree-builtin-rpm.c index 95d709d9..946fe3ad 100644 --- a/src/rpmostree-builtin-rpm.c +++ b/src/rpmostree-builtin-rpm.c @@ -380,11 +380,14 @@ pkg_print (GFile *root, Header pkg, { gsize plen = strlen (nevra); gsize rlen = strlen (from_repo) + 1; + int off = 0; --align; // hacky ... for leading spaces. + off = align - (plen + rlen); + if (align > (plen + rlen)) - printf ("%s%*s@%s\n", nevra, align - (plen + rlen), "", from_repo); + printf ("%s%*s@%s\n", nevra, off, "", from_repo); else align = 0; }