From 0917103442096f6487409686fcfa29440587e040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Ko=C5=82odziej?= Date: Sun, 25 Sep 2016 18:20:10 +0200 Subject: app-editors/fte: fix cpp14 compilation errors; bug #595048 Change config generating Perl script to cast int literals to char in default config file to avoid narrowing conversions. Closes: https://github.com/gentoo/gentoo/pull/2411 Signed-off-by: David Seifert --- app-editors/fte/files/fte-cpp14.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app-editors/fte/files/fte-cpp14.patch (limited to 'app-editors/fte/files') diff --git a/app-editors/fte/files/fte-cpp14.patch b/app-editors/fte/files/fte-cpp14.patch new file mode 100644 index 000000000000..bea83b6a5ccd --- /dev/null +++ b/app-editors/fte/files/fte-cpp14.patch @@ -0,0 +1,17 @@ +Fix C++14 compilation errors. Add casting int literals to char in config +generator to avoid narrowing conversions. +Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=595048 + +--- a/src/mkdefcfg.pl ++++ b/src/mkdefcfg.pl +@@ -24,8 +24,8 @@ + + @c = split(//, $buf); + for ($i = 0; $i < $len; $i++) { +- $out .= sprintf("0x%02X", ord($c[$i])); +- if ($n++ % 10) { ++ $out .= sprintf("(char)0x%02X", ord($c[$i])); ++ if ($n++ % 5) { + $out .= ", "; + } else { + $out .= ",\n"; -- cgit v1.2.3