From 310dc968ea517df364efeef32304be5a835bfd37 Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 9 Sep 2015 11:08:00 +0200 Subject: [PATCH] fix potential type mismatch --- plugins/input/csv/csv_utils.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/input/csv/csv_utils.hpp b/plugins/input/csv/csv_utils.hpp index c24552d6a..93b2a2c9b 100644 --- a/plugins/input/csv/csv_utils.hpp +++ b/plugins/input/csv/csv_utils.hpp @@ -141,7 +141,8 @@ std::tuple autodect_newline(T & stream, std::size_t file_length) // autodetect newlines char newline = '\n'; bool has_newline = false; - std::size_t size = std::min(file_length, 4000UL); + static std::size_t const max_size = 4000; + std::size_t size = std::min(file_length, max_size); for (std::size_t lidx = 0; lidx < size; ++lidx) { char c = static_cast(stream.get());