From 0747f550f709a80d4dda351f6f593113a15d9f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 3 Sep 2016 14:45:31 +0200 Subject: [PATCH] Force cast in sipEnumMemberDef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This resolves FTBFS due to a narrowing conversions using C++11 dialect (GCC6) in python-tqt and python-trinity Signed-off-by: Slávek Banko --- sipgen/gencode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sipgen/gencode.c b/sipgen/gencode.c index 7dcf1b1..f7d239e 100644 --- a/sipgen/gencode.c +++ b/sipgen/gencode.c @@ -2737,6 +2737,9 @@ static int generateEnumMemberTable(sipSpec *pt, moduleDef *mod, classDef *cd, prcode(fp, " {%N, ", emd->pyname); + // enums in sip are always int, but can be an unsigned in C++ code + // therefore it is necessary to force the cast in the generated files + prcode(fp, "(int)"); if (cd != NULL) { if (isProtectedEnum(emd->ed))