Cast width to int. This is complicated to fix without a cast. A possible alternative is to cast the char* to an unsigned long "address" type, but that is even less intuitive.
Signed-off-by: Andrea Bastoni <[email protected]> --- hypervisor/printk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/printk.c b/hypervisor/printk.c index c9e22b29..a32ff8c4 100644 --- a/hypervisor/printk.c +++ b/hypervisor/printk.c @@ -133,11 +133,11 @@ static char *hex2str(unsigned long long value, char *buf, return buf; } -static char *align(char *p1, char *p0, unsigned long width, char fill) +static char *align(char *p1, char *p0, unsigned int width, char fill) { unsigned int n; - if (p1 - p0 >= width) + if ((p1 - p0) >= (int)width) return p1; for (n = 1; p1 - n >= p0; n++) -- 2.28.0 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20201022175826.199614-15-andrea.bastoni%40tum.de.
