Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Silence all compiler warnings when build #17708

@sl1pkn07

Description

@sl1pkn07

Description

silence all warnings when build the project

References

when build the project, a tons of warnings like

Details
tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./runtime/ffi_helper.h(41): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./runtime/ffi_helper.h(41): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./runtime/ffi_helper.h(57): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./runtime/ffi_helper.h(57): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./runtime/ffi_helper.h(77): warning: extra ";" ignored

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./runtime/ffi_helper.h(89): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./runtime/ffi_helper.h(89): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./runtime/ffi_helper.h(99): warning: extra ";" ignored

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./node/container.h(45): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./node/container.h(45): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./ir/expr.h(43): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./ir/expr.h(43): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./ir/expr.h(94): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./ir/expr.h(94): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./ir/expr.h(144): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./ir/expr.h(144): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./ir/expr.h(189): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/./ir/expr.h(189): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/runtime/container.h(176): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/runtime/container.h(176): warning: type qualifier on return type is meaningless

/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mxnet/runtime/container.h(276): warning: extra ";" ignored

(Done in #17718)

and others like

[ 64%] Building CUDA object CMakeFiles/mxnet_static.dir/src/common/utils.cu.o
/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/include/mshadow/./base.h(842): warning: integer conversion resulted in a change of sign

In file included from /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/storage_profiler.h:25,
                 from /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/storage.cc:32:
In member function 'void mxnet::profiler::static_string<string_size>::set(const char*) [with long unsigned int string_size = 128]',
    inlined from 'mxnet::profiler::ProfileCounter::ProfileCounterStat::ProfileCounterStat(const char*, uint64_t)' at /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:636:16,
    inlined from 'static std::unique_ptr<typename std::enable_if<std::is_base_of<mxnet::profiler::ProfileStat, StatType>::value, StatType>::type> mxnet::profiler::Profiler::CreateProfileStat(Args ...) [with StatType = mxnet::profiler::ProfileCounter::ProfileCounterStat; Args = {const char*, long unsigned int}]' at /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:419:38,
    inlined from 'void mxnet::profiler::Profiler::AddNewProfileStat(SetExtraInfoFunction, Args ...) [with StatType = mxnet::profiler::ProfileCounter::ProfileCounterStat; SetExtraInfoFunction = mxnet::profiler::ProfileCounter::SendStat(uint64_t)::<lambda(mxnet::profiler::ProfileCounter::ProfileCounterStat*)>; Args = {const char*, long unsigned int}]' at /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:320:33,
    inlined from 'void mxnet::profiler::ProfileCounter::SendStat(uint64_t)' at /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:673:59:
/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:57:12: warning: 'char* strncpy(char*, const char*, size_t)' output may be truncated copying 127 bytes from a string of length 127 [-Wstringop-truncation]
     strncpy(&string_[0], s, string_size - 1);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In member function 'void mxnet::profiler::static_string<string_size>::set(const char*) [with long unsigned int string_size = 128]',
    inlined from 'mxnet::profiler::ProfileCounter::SendStat(uint64_t)::<lambda(mxnet::profiler::ProfileCounter::ProfileCounterStat*)>' at /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:674:83,
    inlined from 'void mxnet::profiler::Profiler::AddNewProfileStat(SetExtraInfoFunction, Args ...) [with StatType = mxnet::profiler::ProfileCounter::ProfileCounterStat; SetExtraInfoFunction = mxnet::profiler::ProfileCounter::SendStat(uint64_t)::<lambda(mxnet::profiler::ProfileCounter::ProfileCounterStat*)>; Args = {const char*, long unsigned int}]' at /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:321:30,
    inlined from 'void mxnet::profiler::ProfileCounter::SendStat(uint64_t)' at /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:673:59:
/tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/storage/../profiler/./profiler.h:57:12: warning: 'char* strncpy(char*, const char*, size_t)' output may be truncated copying 127 bytes from a string of length 127 [-Wstringop-truncation]
     strncpy(&string_[0], s, string_size - 1);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

the full log:
full_log.txt

this is not considered a bug, because at the moment, the build process finished OK. but is good silence this warnings wich fill with spam the output

greetings

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions