microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.
MIT License
9.74k stars 793 forks source link

avoid unused function warnings when building on Solaris #830

Closed kulikjak closed 4 months ago

kulikjak commented 7 months ago

When building mimalloc on Solaris, we are seeing unused function warnings:

/.../cpython-main/Objects/mimalloc/prim/unix/prim.c: At top level:
/.../cpython-main/Objects/mimalloc/prim/unix/prim.c:90:12: warning: 'mi_prim_access' defined but not used [-Wunused-function]
   90 | static int mi_prim_access(const char *fpath, int mode) {
      |            ^~~~~~~~~~~~~~
/.../cpython-main/Objects/mimalloc/prim/unix/prim.c:87:12: warning: 'mi_prim_close' defined but not used [-Wunused-function]
   87 | static int mi_prim_close(int fd) {
      |            ^~~~~~~~~~~~~
/.../cpython-main/Objects/mimalloc/prim/unix/prim.c:84:16: warning: 'mi_prim_read' defined but not used [-Wunused-function]
   84 | static ssize_t mi_prim_read(int fd, void* buf, size_t bufsize) {
      |                ^~~~~~~~~~~~
/.../cpython-main/Objects/mimalloc/prim/unix/prim.c:81:12: warning: 'mi_prim_open' defined but not used [-Wunused-function]
   81 | static int mi_prim_open(const char* fpath, int open_flags) {
      |            ^~~~~~~~~~~~

This was noticed when building latest Python main; here is the downstream report: https://github.com/python/cpython/issues/112806

daanx commented 4 months ago

Thanks so much -- I merged manually into dev (and dev-slice soon) as the PR was based on master.