Skip to content

Range-related warnings when compiling on macOS #23

@atheriel

Description

@atheriel

I get the following on an Intel mac:

src/xrprof.c:100:55: warning: result of comparison of constant -9223372036854775808 with expression of type 'pid_t' (aka 'int') is always false [-Wtautological-constant-out-of-range-compare]
      if ((errno == ERANGE && (pid == LONG_MAX || pid == LONG_MIN)) ||
                                                  ~~~ ^  ~~~~~~~~
src/xrprof.c:100:36: warning: result of comparison of constant 9223372036854775807 with expression of type 'pid_t' (aka 'int') is always false [-Wtautological-constant-out-of-range-compare]
      if ((errno == ERANGE && (pid == LONG_MAX || pid == LONG_MIN)) ||
                               ~~~ ^  ~~~~~~~~
2 warnings generated.

this may be a platform-specific issue or simply due to better compiler warnings under clang.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions