diff options
author | Geoff Levand <geoff@infradead.org> | 2018-01-06 00:47:39 +0000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-01-10 13:34:54 +1100 |
commit | 41caf09e98b14e34830f524405efc1bdd4087365 (patch) | |
tree | 51c4ff3af3a20d41277b5b2318d141713cfbaa46 /discover | |
parent | c462aa6f8e4658ed23df16bc9e1822e384744e53 (diff) | |
download | talos-petitboot-41caf09e98b14e34830f524405efc1bdd4087365.tar.gz talos-petitboot-41caf09e98b14e34830f524405efc1bdd4087365.zip |
printf: Fix format type warnings
Fixes build warnings like these when building 32 bit programs:
warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument has type ‘uint64_t’
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover')
-rw-r--r-- | discover/device-handler.c | 3 | ||||
-rw-r--r-- | discover/devmapper.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c index 8223015..7a570f9 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -1,4 +1,5 @@ #include <assert.h> +#include <inttypes.h> #include <stdlib.h> #include <stdbool.h> #include <unistd.h> @@ -653,7 +654,7 @@ void device_handler_status_download(struct device_handler *handler, unit++; } update = talloc_asprintf(handler, - _("%u %s downloading: %.0f%% - %lu%cB"), + _("%u %s downloading: %.0f%% - %" PRIu64 "%cB"), handler->n_progress, ngettext("item", "items", handler->n_progress), (current / total) * 100, current_converted, diff --git a/discover/devmapper.c b/discover/devmapper.c index 2b28e0f..d8445e6 100644 --- a/discover/devmapper.c +++ b/discover/devmapper.c @@ -2,6 +2,7 @@ #include <types/types.h> #include <log/log.h> #include <errno.h> +#include <inttypes.h> #include <string.h> #include <sys/types.h> @@ -231,7 +232,7 @@ static int run_create_task(const char *dm_name, const struct target *target) struct dm_task *task; uint32_t cookie; - pb_debug("%s: %lu %lu '%s' '%s'\n", __func__, + pb_debug("%s: %" PRIu64 " %" PRIu64 " '%s' '%s'\n", __func__, target->start_sector, target->end_sector, target->ttype, target->params); |