Skip to content

OS X build issue in THP_decodeInt64Buffer #18

@szagoruyko

Description

@szagoruyko

with gcc-6:

cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from /Users/szagoruyko/research/rocks/pytorch/torch/csrc/generic/Storage.cpp:297:0,
                 from generic/Storage.cpp:1,
                 from torch/csrc/Storage.cpp:11:
/Users/szagoruyko/research/rocks/pytorch/torch/csrc/generic/StorageMethods.cpp: In function 'PyObject* THPLongStorage_fromBuffer(PyObject*, PyObject*, PyObject*)':
/Users/szagoruyko/research/rocks/pytorch/torch/csrc/generic/StorageMethods.cpp:138:34: error: invalid conversion from 'long int*' to 'int64_t* {aka long long int*}' [-fpermissive]
   THP_decodeInt64Buffer(storage->data, src + offset, byte_order, count);
                         ~~~~~~~~~^~~~
In file included from torch/csrc/Storage.cpp:8:0:
torch/csrc/byte_order.h:12:6: note:   initializing argument 1 of 'void THP_decodeInt64Buffer(int64_t*, const uint8_t*, THPByteOrder, size_t)'
 void THP_decodeInt64Buffer(int64_t* dst, const uint8_t* src, THPByteOrder order, size_t len);
      ^~~~~~~~~~~~~~~~~~~~~

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