From: Alan Modra <amodra@gmail.com>
To: Cary Coutant <ccoutant@gmail.com>
Cc: Fangrui Song <maskray@google.com>, binutils@sourceware.org
Subject: Re: [PATCH] gold: add --compress-debug-sections=zstd [PR 29641]
Date: Fri, 11 Nov 2022 18:10:31 +1030 [thread overview]
Message-ID: <Y238b4zohOjpRLkX@squeak.grove.modra.org> (raw)
In-Reply-To: <CAJimCsGoHdLzoAYjO+ymYdsPJEK+KLJFuvT6ECF2ZQiTmJP1-A@mail.gmail.com>
Applied.
Fix the following:
compressed_output.cc:86:8: error: assignment of read-only variable ‘size’
86 | size = ZSTD_compress(*compressed_data + header_size, size, uncompressed_data,
diff --git a/gold/compressed_output.cc b/gold/compressed_output.cc
index e9f12241f26..f192ddb5080 100644
--- a/gold/compressed_output.cc
+++ b/gold/compressed_output.cc
@@ -81,7 +81,7 @@ zstd_compress(int header_size, const unsigned char *uncompressed_data,
unsigned long uncompressed_size,
unsigned char **compressed_data, unsigned long *compressed_size)
{
- const size_t size = ZSTD_compressBound(uncompressed_size);
+ size_t size = ZSTD_compressBound(uncompressed_size);
*compressed_data = new unsigned char[size + header_size];
size = ZSTD_compress(*compressed_data + header_size, size, uncompressed_data,
uncompressed_size, ZSTD_CLEVEL_DEFAULT);
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2022-11-11 7:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-01 2:38 Fangrui Song
2022-10-11 3:21 ` ping " Fangrui Song
2022-10-21 5:46 ` PING^2 " Fangrui Song
2022-11-10 21:46 ` Cary Coutant
2022-11-10 21:47 ` Cary Coutant
2022-11-10 22:00 ` Cary Coutant
2022-11-11 7:40 ` Alan Modra [this message]
2022-11-11 8:00 ` Fangrui Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y238b4zohOjpRLkX@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=ccoutant@gmail.com \
--cc=maskray@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).