Hello community, here is the log from the commit of package pyzy for openSUSE:Factory checked in at 2015-07-22 09:19:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pyzy (Old) and /work/SRC/openSUSE:Factory/.pyzy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pyzy" Changes: -------- --- /work/SRC/openSUSE:Factory/pyzy/pyzy.changes 2015-02-27 11:00:34.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.pyzy.new/pyzy.changes 2015-07-22 09:19:59.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Jul 21 10:30:52 UTC 2015 - [email protected] + +- signed-char.patch: Fix -Wnarrowing warning + +------------------------------------------------------------------- New: ---- signed-char.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pyzy.spec ++++++ --- /var/tmp/diff_new_pack.nIXmqO/_old 2015-07-22 09:20:00.000000000 +0200 +++ /var/tmp/diff_new_pack.nIXmqO/_new 2015-07-22 09:20:00.000000000 +0200 @@ -30,6 +30,8 @@ Patch1: autofix.diff # PATCH-FIX-UPSTREAM pyzy-opencc-1_0_2-build.patch [email protected] -- Use opencc 1.0.2 Patch2: pyzy-opencc-1_0_2-build.patch +# PATCH-FIX-UPSTREAM signed-char.patch [email protected] -- Fix -Wnarrowing warning +Patch3: signed-char.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ BuildRequires: glib2-devel >= 2.24.0 @@ -91,6 +93,7 @@ %setup -q %patch -P 1 -p1 %patch2 -p1 +%patch3 -p1 cp %{SOURCE1} data/db/open-phrase cp %{SOURCE2} data/db/open-phrase ++++++ signed-char.patch ++++++ Index: pyzy-1.0git20120805/src/DoublePinyinContext.cc =================================================================== --- pyzy-1.0git20120805.orig/src/DoublePinyinContext.cc +++ pyzy-1.0git20120805/src/DoublePinyinContext.cc @@ -352,7 +352,7 @@ DoublePinyinContext::isPinyin (int i) return NULL; } - char sheng = ID_TO_SHENG (i); + signed char sheng = ID_TO_SHENG (i); if (sheng == PINYIN_ID_VOID) { return NULL; @@ -365,8 +365,8 @@ inline const Pinyin * DoublePinyinContext::isPinyin (int i, int j) { const Pinyin *pinyin = NULL; - char sheng = ID_TO_SHENG (i); - const char *yun = ID_TO_YUNS (j); + signed char sheng = ID_TO_SHENG (i); + const signed char *yun = ID_TO_YUNS (j); do { if (sheng == PINYIN_ID_VOID || yun[0] == PINYIN_ID_VOID) Index: pyzy-1.0git20120805/src/DoublePinyinTable.h =================================================================== --- pyzy-1.0git20120805.orig/src/DoublePinyinTable.h +++ pyzy-1.0git20120805/src/DoublePinyinTable.h @@ -26,7 +26,7 @@ #define PINYIN_ID_AEO PINYIN_ID_ZERO -static const char double_pinyin_mspy_sheng[] = { +static const signed char double_pinyin_mspy_sheng[] = { PINYIN_ID_AEO, // A PINYIN_ID_B, // B PINYIN_ID_C, // C @@ -55,7 +55,7 @@ static const char double_pinyin_mspy_she PINYIN_ID_Z, // Z PINYIN_ID_VOID, // ; }; -static const char double_pinyin_mspy_yun[][2] = { +static const signed char double_pinyin_mspy_yun[][2] = { { PINYIN_ID_A, PINYIN_ID_VOID }, // A { PINYIN_ID_OU, PINYIN_ID_VOID }, // B { PINYIN_ID_IAO, PINYIN_ID_VOID }, // C @@ -84,7 +84,7 @@ static const char double_pinyin_mspy_yun { PINYIN_ID_EI, PINYIN_ID_VOID }, // Z { PINYIN_ID_ING, PINYIN_ID_VOID }, // ; }; -static const char double_pinyin_zrm_sheng[] = { +static const signed char double_pinyin_zrm_sheng[] = { PINYIN_ID_AEO, // A PINYIN_ID_B, // B PINYIN_ID_C, // C @@ -113,7 +113,7 @@ static const char double_pinyin_zrm_shen PINYIN_ID_Z, // Z PINYIN_ID_VOID, // ; }; -static const char double_pinyin_zrm_yun[][2] = { +static const signed char double_pinyin_zrm_yun[][2] = { { PINYIN_ID_A, PINYIN_ID_VOID }, // A { PINYIN_ID_OU, PINYIN_ID_VOID }, // B { PINYIN_ID_IAO, PINYIN_ID_VOID }, // C @@ -142,7 +142,7 @@ static const char double_pinyin_zrm_yun[ { PINYIN_ID_EI, PINYIN_ID_VOID }, // Z { PINYIN_ID_VOID, PINYIN_ID_VOID }, // ; }; -static const char double_pinyin_abc_sheng[] = { +static const signed char double_pinyin_abc_sheng[] = { PINYIN_ID_ZH, // A PINYIN_ID_B, // B PINYIN_ID_C, // C @@ -171,7 +171,7 @@ static const char double_pinyin_abc_shen PINYIN_ID_Z, // Z PINYIN_ID_VOID, // ; }; -static const char double_pinyin_abc_yun[][2] = { +static const signed char double_pinyin_abc_yun[][2] = { { PINYIN_ID_A, PINYIN_ID_VOID }, // A { PINYIN_ID_OU, PINYIN_ID_VOID }, // B { PINYIN_ID_IN, PINYIN_ID_UAI }, // C @@ -200,7 +200,7 @@ static const char double_pinyin_abc_yun[ { PINYIN_ID_IAO, PINYIN_ID_VOID }, // Z { PINYIN_ID_VOID, PINYIN_ID_VOID }, // ; }; -static const char double_pinyin_zgpy_sheng[] = { +static const signed char double_pinyin_zgpy_sheng[] = { PINYIN_ID_CH, // A PINYIN_ID_B, // B PINYIN_ID_C, // C @@ -229,7 +229,7 @@ static const char double_pinyin_zgpy_she PINYIN_ID_Z, // Z PINYIN_ID_VOID, // ; }; -static const char double_pinyin_zgpy_yun[][2] = { +static const signed char double_pinyin_zgpy_yun[][2] = { { PINYIN_ID_A, PINYIN_ID_VOID }, // A { PINYIN_ID_IAO, PINYIN_ID_VOID }, // B { PINYIN_ID_VOID, PINYIN_ID_VOID }, // C @@ -258,7 +258,7 @@ static const char double_pinyin_zgpy_yun { PINYIN_ID_OU, PINYIN_ID_VOID }, // Z { PINYIN_ID_ING, PINYIN_ID_VOID }, // ; }; -static const char double_pinyin_pyjj_sheng[] = { +static const signed char double_pinyin_pyjj_sheng[] = { PINYIN_ID_ZERO, // A PINYIN_ID_B, // B PINYIN_ID_C, // C @@ -287,7 +287,7 @@ static const char double_pinyin_pyjj_she PINYIN_ID_Z, // Z PINYIN_ID_VOID, // ; }; -static const char double_pinyin_pyjj_yun[][2] = { +static const signed char double_pinyin_pyjj_yun[][2] = { { PINYIN_ID_A, PINYIN_ID_VOID }, // A { PINYIN_ID_IA, PINYIN_ID_UA }, // B { PINYIN_ID_UAN, PINYIN_ID_VOID }, // C @@ -316,7 +316,7 @@ static const char double_pinyin_pyjj_yun { PINYIN_ID_UN, PINYIN_ID_VOID }, // Z { PINYIN_ID_VOID, PINYIN_ID_VOID }, // ; }; -static const char double_pinyin_xhe_sheng[] = { +static const signed char double_pinyin_xhe_sheng[] = { PINYIN_ID_AEO, // A PINYIN_ID_B, // B PINYIN_ID_C, // C @@ -345,7 +345,7 @@ static const char double_pinyin_xhe_shen PINYIN_ID_Z, // Z PINYIN_ID_VOID, // ; }; -static const char double_pinyin_xhe_yun[][2] = { +static const signed char double_pinyin_xhe_yun[][2] = { { PINYIN_ID_A, PINYIN_ID_VOID }, // A { PINYIN_ID_IN, PINYIN_ID_VOID }, // B { PINYIN_ID_AO, PINYIN_ID_VOID }, // C @@ -376,8 +376,8 @@ static const char double_pinyin_xhe_yun[ }; static const struct { - const char (&sheng)[27]; - const char (&yun)[27][2]; + const signed char (&sheng)[27]; + const signed char (&yun)[27][2]; } double_pinyin_map [] = { { double_pinyin_mspy_sheng, double_pinyin_mspy_yun }, { double_pinyin_zrm_sheng, double_pinyin_zrm_yun },
