From 09b766338cf8935f0bc5be82f8bb6c90728810a6 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 13 Jan 2024 20:38:32 +0000 Subject: [PATCH] Fix integer overflow warning with GCC 12 --- src/rt/printer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rt/printer.c b/src/rt/printer.c index bcfd52d7..a6d5cb62 100644 --- a/src/rt/printer.c +++ b/src/rt/printer.c @@ -175,7 +175,7 @@ static void make_enum_map(print_func_t *f, type_t type) { int stride = 0; - const int nlits = type_enum_literals(type); + const unsigned nlits = type_enum_literals(type); for (int i = 0; i < nlits; i++) stride = MAX(stride, ident_len(tree_ident(type_enum_literal(type, i)))); -- 2.39.2