ponylang/ponyc

Compilation error when using memalign

vijayee opened this issue · 1 comments

Received compilation errors when running commands make configure use=thread_sanitizer,pool_memalign and make build. Below is the error ouput.

/ponyc/src/libponyrt/mem/pool_memalign.c:29:9: error: unused variable 'code' [-Werror,-Wunused-variable]
    int code = posix_memalign(&p, POOL_ALIGN, size);
        ^
/home/victor/Workspace/src/github.com/vijayee/ponyc/src/libponyrt/mem/pool_memalign.c:36:31: error: unused parameter 'index' [-Werror,-Wunused-parameter]
void ponyint_pool_free(size_t index, void* p)
                              ^
/home/victor/Workspace/src/github.com/vijayee/ponyc/src/libponyrt/mem/pool_memalign.c:46:7: error: unused variable 'code' [-Werror,-Wunused-variable]
  int code = posix_memalign(&p, POOL_ALIGN, size);
      ^
3 errors generated.
gmake[3]: *** [src/libponyrt/CMakeFiles/libponyrt.dir/build.make:584: src/libponyrt/CMakeFiles/libponyrt.dir/mem/pool_memalign.c.o] Error 1
gmake[3]: Leaving directory '/home/victor/Workspace/src/github.com/vijayee/ponyc/build/build_release'
gmake[2]: *** [CMakeFiles/Makefile2:395: src/libponyrt/CMakeFiles/libponyrt.dir/all] Error 2
gmake[2]: *** Waiting for unfinished jobs....

This should be straightforward to fix, but we should have some CI as part of this to test that this is working (we dont have any coverage for all the funky stuff). We don't need to add coverage for every option, but we should add on 1 platform and these two options and can add more later.

We should first see in a PR the CI addition and it failing with these warnings, then fix them and it either exposes other errors or it passes.