Skip to content

Conversation

kmou424
Copy link
Contributor

@kmou424 kmou424 commented Sep 4, 2021

…c in c++

Aim: To adapt C++

Compilation errors:
simple_buffer.c:47:9: error: cannot initialize a variable of type 'char *' with an rvalue of type 'void '
char
compressed_data = malloc((size_t)max_dst_size);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple_buffer.c:76:15: error: cannot initialize a variable of type 'char *const' with an rvalue of type 'void '
char
const regen_buffer = malloc(src_size);
^ ~~~~~~~~~~~~~~~~
2 errors generated.

Generally, we need code that can be used in C and C++.I think this change will bring a better experience for visitors.

If this is unnecessary, please close this PR :)

…c in c++

Aim: To adapt C++

Compilation errors:
simple_buffer.c:47:9: error: cannot initialize a variable of type 'char *' with an rvalue of type 'void *'
  char* compressed_data = malloc((size_t)max_dst_size);
        ^                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple_buffer.c:76:15: error: cannot initialize a variable of type 'char *const' with an rvalue of type 'void *'
  char* const regen_buffer = malloc(src_size);
              ^              ~~~~~~~~~~~~~~~~
2 errors generated.
@Cyan4973 Cyan4973 merged commit d233473 into lz4:dev Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants