Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: simple_buffer: We must explicit convert pointer after mallo… #1026

Merged
merged 1 commit into from
Sep 4, 2021

Commits on Sep 4, 2021

  1. examples: simple_buffer: We must explicit convert pointer after mallo…

    …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.
    kmou424 committed Sep 4, 2021
    Configuration menu
    Copy the full SHA
    a396089 View commit details
    Browse the repository at this point in the history