From d844529dc7a6c40d17d8ce74091dce1ec77d65b6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Jul 2021 18:47:04 +0200 Subject: [PATCH] macro: change DECIMAL_STR_WIDTH() return type to size_t, like strlen() and so on --- src/basic/macro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/macro.h b/src/basic/macro.h index 829d8dc8a70..90f4e02d190 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -350,7 +350,7 @@ static inline int __coverity_check_and_return__(int condition) { #define DECIMAL_STR_WIDTH(x) \ ({ \ typeof(x) _x_ = (x); \ - unsigned ans = 1; \ + size_t ans = 1; \ while ((_x_ /= 10) != 0) \ ans++; \ ans; \ -- 2.47.3