Skip to content

Build fails in clang i386 #10698

@yurivict

Description

@yurivict

Getting these errors in version 2.1.2 in the FreeBSD port on FreeBSD 12 i386:

src/_image_wrapper.cpp:386:24: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'int') in initializer list [-Wc++11-narrowing]
    npy_intp dim[3] = {rows, cols, 4};
                       ^~~~
src/_image_wrapper.cpp:386:24: note: insert an explicit cast to silence this issue
    npy_intp dim[3] = {rows, cols, 4};
                       ^~~~
                       static_cast<npy_intp>( )
src/_image_wrapper.cpp:386:30: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'int') in initializer list [-Wc++11-narrowing]
    npy_intp dim[3] = {rows, cols, 4};
                             ^~~~
src/_image_wrapper.cpp:386:30: note: insert an explicit cast to silence this issue
    npy_intp dim[3] = {rows, cols, 4};
                             ^~~~
                             static_cast<npy_intp>( )
src/_image_wrapper.cpp:431:24: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'int') in initializer list [-Wc++11-narrowing]
    npy_intp dim[3] = {rows, cols, 4};
                       ^~~~
src/_image_wrapper.cpp:431:24: note: insert an explicit cast to silence this issue
    npy_intp dim[3] = {rows, cols, 4};
                       ^~~~
                       static_cast<npy_intp>( )
src/_image_wrapper.cpp:431:30: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'npy_intp' (aka 'int') in initializer list [-Wc++11-narrowing]
    npy_intp dim[3] = {rows, cols, 4};
                             ^~~~
src/_image_wrapper.cpp:431:30: note: insert an explicit cast to silence this issue
    npy_intp dim[3] = {rows, cols, 4};
                             ^~~~
                             static_cast<npy_intp>( )
                                                                                                                                                           1574,5        99%

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions