Skip to content

Commit

Permalink
Fix compilation error in gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamVenner committed Jun 6, 2024
1 parent bbf799b commit f1c9b29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/node_bzip2_compress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ namespace NodeBzip2
if (!CompressMethod(info, context))
return;

Result result = CompressRaw(DataSlice::Borrowed(context.data, context.length), context.options);
DataSlice data = DataSlice::Borrowed(context.data, context.length);

Result result = CompressRaw(data, context.options);

if (!result.hasError())
{
Expand Down
4 changes: 3 additions & 1 deletion src/node_bzip2_decompress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ namespace NodeBzip2
if (!DecompressMethod(info, context))
return;

Result result = DecompressRaw(DataSlice::Borrowed(context.data, context.length), context.options);
DataSlice data = DataSlice::Borrowed(context.data, context.length);

Result result = DecompressRaw(data, context.options);

if (!result.hasError())
{
Expand Down

0 comments on commit f1c9b29

Please sign in to comment.