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)
- undocumented breaking change GenerateText->GenText
- [Java, FlatBuffers 23.5.26, Mac OS 14.3] getByKey returns null while accessing using vector index works
- `get_root_as_*` functions not generated [Rust, 23.5.26, Linux] HOT 1
- Generating schemas with language adapters (as optional add-ons)?
- Streaming flatbuffers in java HOT 1
- [TS] optional escalar not set in the binary when it holds value 0 HOT 13
- Release a new version, please HOT 1
- Default value of 0 for field is not part of [optional] enum (java)
- Buffer generated in python gets rejected by flatcc [Python / C, Flatbuffer 23.5.26]
- Invalid Code generation if Property has same name as Struct [Windows/C#/24.3.7]
- v24.3.7 of Rust crate not released to crates.io HOT 4
- [v24.3.7] Rust: push_u8_u64_alignment test fails on i686 target (Ubuntu 22.04, CentOS 9)
- How to print nested table using FlatBufferToString?
- [Python] Flatc stub compatibility with gRPC asyncio Interface
- [Rust] Add better support for "crate-per-schema" HOT 2
- [Bazel CI] Swift toolchain analysis failed due to missing 'swift' configuration fragment HOT 1
- [C#][Feature Request] Unity Game Development needs mutate fixed size string value HOT 2
- Generated CreateXDirect with std::span<T> or "T* + size" payloads
- newbie's question.. use in c# / vector struct / adding int64...
- Feature: --gen-object-api support for Kotlin [Kotlin, FlatBuffers 24.3.25]
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.