# HG changeset patch # User Alpar Juttner # Date 1427972238 -7200 # Node ID 18c89646185e42f046d9babee467cf347ebccaaf # Parent f05270f176d9852ed2e67e4abd0ae2b058d194dc Suppress MSVC warning C4267 (#519) C4267: conversion from 'size_t' to 'type', possible loss of data diff -r f05270f176d9 -r 18c89646185e CMakeLists.txt --- a/CMakeLists.txt Thu Apr 02 10:03:35 2015 +0200 +++ b/CMakeLists.txt Thu Apr 02 12:57:18 2015 +0200 @@ -150,10 +150,13 @@ SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb") ELSEIF(MSVC) # This part is unnecessary 'casue the same is set by the lemon/core.h. - # Still keep it as an example. - SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996") + # Still kept as an example. + + # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996") + # Suppressed warnings: # C4250: 'class1' : inherits 'class2::member' via dominance + # C4267: conversion from 'size_t' to 'type', possible loss of data # C4355: 'this' : used in base member initializer list # C4503: 'function' : decorated name length exceeded, name was truncated # C4800: 'type' : forcing value to bool 'true' or 'false' diff -r f05270f176d9 -r 18c89646185e lemon/arg_parser.h --- a/lemon/arg_parser.h Thu Apr 02 10:03:35 2015 +0200 +++ b/lemon/arg_parser.h Thu Apr 02 12:57:18 2015 +0200 @@ -26,6 +26,7 @@ #include #include #include +#include #include ///\ingroup misc diff -r f05270f176d9 -r 18c89646185e lemon/core.h --- a/lemon/core.h Thu Apr 02 10:03:35 2015 +0200 +++ b/lemon/core.h Thu Apr 02 12:57:18 2015 +0200 @@ -29,12 +29,13 @@ // Disable the following warnings when compiling with MSVC: // C4250: 'class1' : inherits 'class2::member' via dominance +// C4267: conversion from 'size_t' to 'type', possible loss of data // C4355: 'this' : used in base member initializer list // C4503: 'function' : decorated name length exceeded, name was truncated // C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) // C4996: 'function': was declared deprecated #ifdef _MSC_VER -#pragma warning( disable : 4250 4355 4503 4800 4996 ) +#pragma warning( disable : 4250 4267 4355 4503 4800 4996 ) #endif #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) diff -r f05270f176d9 -r 18c89646185e lemon/counter.h --- a/lemon/counter.h Thu Apr 02 10:03:35 2015 +0200 +++ b/lemon/counter.h Thu Apr 02 12:57:18 2015 +0200 @@ -22,6 +22,8 @@ #include #include +#include + ///\ingroup timecount ///\file ///\brief Tools for counting steps and events