aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-10-12 12:27:08 +0200
committerBjörn Gustavsson <[email protected]>2011-10-13 11:12:42 +0200
commita0f45f929092c8d3355a8604780a4f4df49f3759 (patch)
treed66acb218c654c111434c2c03ea16a85b665b760
parent50ea5cd116cc33a1af7590b52205d923266f4544 (diff)
downloadotp-a0f45f929092c8d3355a8604780a4f4df49f3759.tar.gz
otp-a0f45f929092c8d3355a8604780a4f4df49f3759.tar.bz2
otp-a0f45f929092c8d3355a8604780a4f4df49f3759.zip
make_preload: Don't output a C comment start inside a comment
We already avoid outputting a comment terminator ("*/") inside a comment to avoid causing a syntax error. Also avoid outputting the start of a comment ("/*") to avoid causing a compiler warning. Noticed-by: Tuncer Ayaz
-rwxr-xr-xerts/emulator/utils/make_preload1
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/utils/make_preload b/erts/emulator/utils/make_preload
index d0671e998d..d22f08f993 100755
--- a/erts/emulator/utils/make_preload
+++ b/erts/emulator/utils/make_preload
@@ -88,6 +88,7 @@ foreach $file (@ARGV) {
print "unsigned char preloaded_$module", "[] = {\n";
for ($i = 0; $i < length($_); $i++) {
if ($i % 8 == 0 && $comment ne '') {
+ $comment =~ s@/\*@..@g; # Comment start -- avoid warning.
$comment =~ s@\*/@..@g; # Comment terminator.
print " /* $comment */\n ";
$comment = '';