Comments (3)
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 dataAnd 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.
Just fixed.
from flatbuffers.
Much better; thanks!
from flatbuffers.
Related Issues (20)
- Unable to generate GRPC interface for Python? HOT 9
- Question about installing '24.3.25' CocoaPods in iOS project HOT 1
- Request to Add `BUILD_LIBRARY_FOR_DISTRIBUTION` to FlatBuffers.podspec and Update CocoaPods Distribution Version HOT 2
- Unable to get correct set data
- Test failures with Numpy 2.0
- Wireshark lua dissector generator [same to #153]
- Auto-generated Lua files doesn't support lower-case struct name HOT 1
- [Feature Request] Add switch to enable alternate runtime implementations [Nim, any compiler, any OS, master]
- Get wrong double value using IndirectDouble to serialize.
- [fr] Add support for Mojo HOT 1
- object.declaration_file is empty when use Parser to load .fbs schema file. HOT 1
- Add prefix to import path when referencing generated modules [Python, flatc 24.3.25] HOT 1
- Python "struct.error: unpack_from requires a buffer of at least 1718886439 bytes for unpacking 4 bytes at offset 1718886435 (actual buffer size is 361)" HOT 3
- [Java] Add Automatic-Module-Name to Manifest file
- [Java] Support JPMS for Java 9+
- Poor escaping of keywords in C++ Union codegen
- Java enum name() function source compatibility issue
- Document which schema changes will preserve source compatibility
- Requesting a stable download url
- Upgrade bitflags dependency in Rust implementation to version 2.6.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flatbuffers.