Added Wconversion so the gcc/clang warnings will be more similar to W4 on MSVC.

This also points out some important issues like:
warning: conversion to 'size_t {aka unsigned int}' from 'long long int' may alter its value [-Wconversion]
   state.SetBytesProcessed(items_processed * sizeof(v));
This occurs on 32 bit systems where size_t is only 32 bits.
This commit is contained in:
Anton Danielsson 2015-10-05 14:59:15 +02:00
parent fcf4e99e01
commit 0a8e0dbb0b

View File

@ -37,6 +37,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
else()
add_cxx_compiler_flag(-Wall)
endif()
add_cxx_compiler_flag(-Wconversion)
add_cxx_compiler_flag(-Wextra)
add_cxx_compiler_flag(-Wshadow)
add_cxx_compiler_flag(-Werror RELEASE)