Skip to content

error: cast from pointer to smaller type 'int' loses information #264

@yurivict

Description

@yurivict
openTSNE/dependencies/annoy/annoymodule.cc:180:12: error: cast from pointer to smaller type 'int' loses information
  180 |     return (int) NULL;
      |            ^~~~~~~~~~
1 error generated.
error: command '/usr/local/libexec/ccache/cc' failed with exit code 1

ERROR Backend subprocess exited when trying to invoke build_wheel

In C++ NULL is for a null pointer, and it isn't castable to int.

The code around this line actually doesn't make sense: it returns 0 regardless of the comparison result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions