forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: gentoo#2411 Signed-off-by: David Seifert <[email protected]>
- Loading branch information
1 parent
1403a28
commit 0917103
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters