From 2afbe26378a31be9db49715437532ac2451b1927 Mon Sep 17 00:00:00 2001
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Date: Thu, 21 Nov 2019 22:27:40 +0100
Subject: [PATCH] build: fix warning re comparison of enum and uint

The warning is observed when tarantool is compiled by GCC 9.1.0.

Warnings are treated as errors during a debug build or when
-DENABLE_WERROR=ON option is passed to cmake, that is usual for our
testing jobs in CI.

The commit that introduces the problem is
3a8adccf5fee5b8a19583c8eb846b18f10e449d6 ('access: fix invalid error
type for not found user').

Reviewed-by: Alexander Turenko <alexander.turenko@tarantool.org>
---
 src/box/user.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/box/user.cc b/src/box/user.cc
index c8991b15a8..39520f2317 100644
--- a/src/box/user.cc
+++ b/src/box/user.cc
@@ -530,7 +530,7 @@ user_find_by_name(const char *name, uint32_t len)
 			return user;
 	}
 	diag_set(ClientError, ER_NO_SUCH_USER,
-		 tt_cstr(name, MIN(BOX_INVALID_NAME_MAX, len)));
+		 tt_cstr(name, MIN((uint32_t) BOX_INVALID_NAME_MAX, len)));
 	return NULL;
 }
 
-- 
GitLab