Git Product home page Git Product logo

Comments (3)

 avatar commented on April 28, 2024

Thanks.. never tried -W4, will address these.

On Fri, Jun 27, 2014 at 7:03 AM, jffmarker [email protected] wrote:

flatbuffers.h yields several compile warnings under VS2013 Update 2 with
warning level 4, both when used to compile flatc, as well as use a
generated header file. Ignoring them when building flatc is less of an
issue, but it'd be nice if including a generated header (which then
includes flatbuffers.h) didn't force us to back off or ignore warnings.

For example, when just including a generated header (haven't actually used
code from it yet):
...flatbuffers.h(410) : error C2220: warning treated as error - no
'object' file generated
...flatbuffers.h(410) : warning C4244: 'argument' : conversion from
'flatbuffers::uoffset_t' to 'flatbuffers::voffset_t', possible loss of data
...flatbuffers.h(419) : warning C4244: 'argument' : conversion from
'flatbuffers::uoffset_t' to 'flatbuffers::voffset_t', possible loss of data

And when compiling flatc (also some come from CPP files):
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : error C2220:
warning treated as error - no 'object' file generated
(...flatbuffers\src\idl_gen_text.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\idl_gen_text.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : error C2220:
warning treated as error - no 'object' file generated
(...flatbuffers\src\flatc.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\flatc.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(419) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\idl_gen_text.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(419) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\flatc.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : error C2220:
warning treated as error - no 'object' file generated
(...flatbuffers\src\idl_gen_cpp.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\idl_gen_cpp.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(640) : warning C4100:
'other' : unreferenced formal parameter
(...flatbuffers\src\idl_gen_text.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(419) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\idl_gen_cpp.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(640) : warning C4100:
'other' : unreferenced formal parameter (...flatbuffers\src\flatc.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(652) : warning C4245:
'return' : conversion from 'int' to 'size_t', signed/unsigned mismatch
(...flatbuffers\src\idl_gen_text.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(652) : warning C4245:
'return' : conversion from 'int' to 'size_t', signed/unsigned mismatch
(...flatbuffers\src\flatc.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(640) : warning C4100:
'other' : unreferenced formal parameter (...flatbuffers\src\idl_gen_cpp.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(652) : warning C4245:
'return' : conversion from 'int' to 'size_t', signed/unsigned mismatch
(...flatbuffers\src\idl_gen_cpp.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : error C2220:
warning treated as error - no 'object' file generated
(...flatbuffers\src\idl_gen_java.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\idl_gen_java.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(419) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\idl_gen_java.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(640) : warning C4100:
'other' : unreferenced formal parameter
(...flatbuffers\src\idl_gen_java.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : error C2220:
warning treated as error - no 'object' file generated
(...flatbuffers\src\idl_parser.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(652) : warning C4245:
'return' : conversion from 'int' to 'size_t', signed/unsigned mismatch
(...flatbuffers\src\idl_gen_java.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(410) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\idl_parser.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(419) : warning C4244:
'argument' : conversion from 'flatbuffers::uoffset_t' to
'flatbuffers::voffset_t', possible loss of data
(...flatbuffers\src\idl_parser.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(640) : warning C4100:
'other' : unreferenced formal parameter (...flatbuffers\src\idl_parser.cpp)
...flatbuffers\include\flatbuffers/flatbuffers.h(652) : warning C4245:
'return' : conversion from 'int' to 'size_t', signed/unsigned mismatch
(...flatbuffers\src\idl_parser.cpp)
...flatbuffers\src\idl_gen_text.cpp(157) : warning C4244: 'argument' :
conversion from 'const int' to 'flatbuffers::voffset_t', possible loss of
data
...flatbuffers\src\idl_gen_text.cpp(158) : warning C4244: 'argument' :
conversion from 'const int' to 'flatbuffers::voffset_t', possible loss of
data
...flatbuffers\src\idl_gen_text.cpp(176) : warning C4244: 'argument' :
conversion from 'int' to 'flatbuffers::voffset_t', possible loss of data
...flatbuffers\src\idl_gen_text.cpp(204) : warning C4244: 'argument' :
conversion from 'int' to 'flatbuffers::voffset_t', possible loss of data
...flatbuffers\src\idl_parser.cpp(105) : warning C4244: 'argument' :
conversion from 'int' to 'char', possible loss of data
...flatbuffers\src\idl_gen_java.cpp(81) : warning C4244: 'argument' :
conversion from 'int' to 'char', possible loss of data
...flatbuffers\src\idl_gen_java.cpp(82) : warning C4244: 'argument' :
conversion from 'int' to 'char', possible loss of data
...flatbuffers\src\idl_parser.cpp(371) : warning C4244: 'argument' :
conversion from 'const int' to 'flatbuffers::voffset_t', possible loss of
data
...flatbuffers\src\idl_parser.cpp(417) : warning C4244: 'argument' :
conversion from 'int' to 'flatbuffers::voffset_t', possible loss of data
...flatbuffers\src\idl_parser.cpp(429) : warning C4244: 'argument' :
conversion from 'int' to 'flatbuffers::voffset_t', possible loss of data
...flatbuffers\src\idl_gen_java.cpp(376) : warning C4100: 'file_name' :
unreferenced formal parameter
...flatbuffers\src\idl_gen_text.cpp(141) : warning C4244: 'argument' :
conversion from 'const int' to 'flatbuffers::voffset_t', possible loss of
data
...flatbuffers\src\idl_gen_text.cpp(191) : see reference to function
template instantiation 'void flatbuffers::GenField(const
flatbuffers::FieldDef &,const flatbuffers::Table *,bool,int,int,std::string
*)' being compiled
...flatbuffers\include\flatbuffers/util.h(35) : warning C4127: conditional
expression is constant (...flatbuffers\src\idl_gen_cpp.cpp)
...flatbuffers\src\idl_gen_cpp.cpp(96) : see reference to function
template instantiation 'std::string flatbuffers::NumToString(T)' being
compiled
with
[
T=int
]
...flatbuffers\include\flatbuffers/util.h(35) : warning C4127: conditional
expression is constant (...flatbuffers\src\idl_gen_java.cpp)
...flatbuffers\src\idl_gen_java.cpp(106) : see reference to function
template instantiation 'std::string flatbuffers::NumToString(T)' being
compiled
with
[
T=int
]
...flatbuffers\src\idl_gen_text.cpp(37) : warning C4100: 'indent_step' :
unreferenced formal parameter
...flatbuffers\src\idl_gen_text.cpp(60) : see reference to function
template instantiation 'void
flatbuffers::Print(T,flatbuffers::Type,int,int,flatbuffers::StructDef
*,std::string *)' being compiled
with
[
T=unsigned char
]
...flatbuffers\src\idl_gen_text.cpp(126) : see reference to function
template instantiation 'void flatbuffers::PrintVector(const
flatbuffers::Vector &,flatbuffers::Type,int,int,std::string *)' being
compiled
...flatbuffers\src\idl_gen_text.cpp(37) : warning C4100: 'indent' :
unreferenced formal parameter
...flatbuffers\src\idl_gen_text.cpp(37) : warning C4100: 'type' :
unreferenced formal parameter
...flatbuffers\include\flatbuffers/util.h(35) : warning C4127: conditional
expression is constant (...flatbuffers\src\idl_parser.cpp)
...flatbuffers\src\idl_parser.cpp(48) : see reference to function template
instantiation 'std::string flatbuffers::NumToString(T)' being compiled
with
[
T=size_t
]
...flatbuffers\include\flatbuffers/util.h(35) : warning C4127: conditional
expression is constant (...flatbuffers\src\idl_gen_text.cpp)
...flatbuffers\src\idl_gen_text.cpp(40) : see reference to function
template instantiation 'std::string flatbuffers::NumToString(T)' being
compiled
with
[
T=unsigned char
]
...flatbuffers\src\idl_gen_text.cpp(60) : see reference to function
template instantiation 'void
flatbuffers::Print(T,flatbuffers::Type,int,int,flatbuffers::StructDef
*,std::string *)' being compiled
with
[
T=unsigned char
]


Reply to this email directly or view it on GitHub
#20.

from flatbuffers.

 avatar commented on April 28, 2024

Just fixed.

from flatbuffers.

jffmarker avatar jffmarker commented on April 28, 2024

Much better; thanks!

from flatbuffers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.