aboutsummaryrefslogtreecommitdiffstats
path: root/community/ostree/fix-format-string.patch
blob: 3bbbe434d74965b6a5592949a993e95490e046a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Without this patch the build fails with the following gcc error:

src/libostree/ostree-repo-commit.c: In function 'write_content_object':
src/libostree/ostree-repo-commit.c:906:62: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'guint64 {aka long long unsigned int}' [-Werror=format=]
             return glnx_throw (error, "min-free-space-size %luMB would be exceeded, %s more required",

src/libostree/ostree-repo-commit.c: In function 'ostree_repo_prepare_transaction':
src/libostree/ostree-repo-commit.c:1620:62: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'guint64 {aka long long unsigned int}' [-Werror=format=]
             return glnx_throw (error, "min-free-space-size %luMB would be exceeded, %s available",

diff -upr libostree-2018.6.orig/src/libostree/ostree-repo-commit.c libostree-2018.6/src/libostree/ostree-repo-commit.c
--- libostree-2018.6.orig/src/libostree/ostree-repo-commit.c	2018-06-30 21:51:20.208924241 +0200
+++ libostree-2018.6/src/libostree/ostree-repo-commit.c	2018-06-30 21:52:12.019151826 +0200
@@ -903,7 +903,7 @@ write_content_object (OstreeRepo
             return glnx_throw (error, "min-free-space-percent '%u%%' would be exceeded, %s more required",
                                self->min_free_space_percent, formatted_required);
           else
-            return glnx_throw (error, "min-free-space-size %luMB would be exceeded, %s more required",
+            return glnx_throw (error, "min-free-space-size %" G_GUINT64_FORMAT "MB would be exceeded, %s more required",
                                self->min_free_space_mb, formatted_required);
         }
       /* This is the main bit that needs mutex protection */
@@ -1617,7 +1617,7 @@ ostree_repo_prepare_transaction (OstreeR
             return glnx_throw (error, "min-free-space-percent '%u%%' would be exceeded, %s available",
                                self->min_free_space_percent, formatted_free);
           else
-            return glnx_throw (error, "min-free-space-size %luMB would be exceeded, %s available",
+            return glnx_throw (error, "min-free-space-size %" G_GUINT64_FORMAT "MB would be exceeded, %s available",
                                self->min_free_space_mb, formatted_free);
         }
       g_mutex_unlock (&self->txn_lock);