From 620d8d6f7caca5cca01f2adaf34cf33b332cf768 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Tue, 12 Aug 2014 15:46:27 -0700 Subject: [PATCH] Fixed compile warning related to file identification feature. Change-Id: Id33cf778caa818c7d3988edee82058e63bfecbf0 Tested: on Linux --- CMakeLists.txt | 2 +- include/flatbuffers/flatbuffers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de525e2..ac1c3a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") endif() -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra") if(FLATBUFFERS_CODE_COVERAGE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fprofile-arcs -ftest-coverage") diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index 0a0ef17..d5f53bf 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -613,7 +613,7 @@ class FlatBufferBuilder { return CreateVectorOfStructs(v.data(), v.size()); } - static const int kFileIdentifierLength = 4; + static const size_t kFileIdentifierLength = 4; // Finish serializing a buffer by writing the root offset. // If a file_identifier is given, the buffer will be prefix with a standard -- 2.7.4