ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.47k stars 888 forks source link

Warnings when compiling in Visual C++ #296

Open PeterDraex opened 6 years ago

PeterDraex commented 6 years ago

Hello, when I include the crow header in my project in Visual Studio 2017 on Windows and I get the following warnings:

crow.h(6644): warning C4267: '+=': conversion from 'size_t' to 'char', possible loss of data
crow.h(6656): warning C4293: '>>': shift count negative or too big, undefined behavior
crow.h(6837): warning C4244: '=': conversion from 'uint64_t' to '::size_t', possible loss of data
crow.h(6592): warning C4267: '+=': conversion from 'size_t' to 'char', possible loss of data

Is this normal?

Thanks, Peter

marosiak commented 6 years ago

Yes it's normal as you're trying to compile linux lib on windows. Sadly crow is linux only :/

On Thu, Mar 15, 2018 at 1:13 PM, Peter Dräxler notifications@github.com wrote:

Hello, when I include the crow header in my project in Visual Studio 2017 on Windows and I get the following warnings:

crow.h(6644): warning C4267: '+=': conversion from 'size_t' to 'char', possible loss of data crow.h(6656): warning C4293: '>>': shift count negative or too big, undefined behavior crow.h(6837): warning C4244: '=': conversion from 'uint64_t' to '::size_t', possible loss of data crow.h(6592): warning C4267: '+=': conversion from 'size_t' to 'char', possible loss of data

Is this normal?

Thanks, Peter

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ipkn/crow/issues/296, or mute the thread https://github.com/notifications/unsubscribe-auth/AIhM4vycJSqxE4p1k_DjhcVfBwLXDithks5telrhgaJpZM4SsCkp .

netromdk commented 6 years ago

No. Crow runs on Linux, Mac, and Windows just fine. These warnings mean that some code should be revisited to not truncate or coerce wrongly.

PeterDraex commented 6 years ago

Would you guys, perhaps, like to label this as a bug? Shouldn’t be hard to get done.