aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-11-11 18:01:58 +1030
committerAlan Modra <amodra@gmail.com>2022-11-11 18:05:36 +1030
commit772e1fe54a43adb1bf282f5cc599862df7b68317 (patch)
treef306e9a1e635f2b0544564c87f7ae67cff3d2973 /gold
parent8b2d02cbb924f1f3718dc5a20f7a9dcf07739d23 (diff)
downloadfsf-binutils-gdb-772e1fe54a43adb1bf282f5cc599862df7b68317.zip
fsf-binutils-gdb-772e1fe54a43adb1bf282f5cc599862df7b68317.tar.gz
fsf-binutils-gdb-772e1fe54a43adb1bf282f5cc599862df7b68317.tar.bz2
Re: gold: add --compress-debug-sections=zstd [PR 29641]
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,
Diffstat (limited to 'gold')
-rw-r--r--gold/compressed_output.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gold/compressed_output.cc b/gold/compressed_output.cc
index e9f1224..f192ddb 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);