Skip to content

Dead loop on aarch64 platform #536

@chestnutprog

Description

@chestnutprog

There are some tautological-constant-out-of-range-compare warnings on aarch64 platform, because char is an unsigned type on it. src/ext/cmd.cpp is fine because result is still correct in this situation, but src/ext/env.cpp doesn't work well.

external/boost/libs/process/src/ext/cmd.cpp:222:28: error: result of comparison of constant -1 with expression of type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' (aka 'char') is always true [-Werror,-Wtautological-constant-out-of-range-compare]
    while (procargs.back() != EOF)
           ~~~~~~~~~~~~~~~ ^  ~~~
external/boost/libs/process/src/ext/cmd.cpp:240:25: error: result of comparison of constant -1 with expression of type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' (aka 'char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
    if (procargs.back() == EOF)
        ~~~~~~~~~~~~~~~ ^  ~~~

external/boost/libs/process/src/ext/env.cpp:130:16: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
    while (*nh != EOF)
           ~~~ ^  ~~~
external/boost/libs/process/src/ext/env.cpp:321:50: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
    while (!procargs || procargs.get()[size - 1] != EOF)
                        ~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions