FLTK logo

Re: [fltk/fltk] VS2017 warnings when building fltk 1.4.x (58296c373a79) (#109)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] VS2017 warnings when building fltk 1.4.x (58296c373a79) (#109) Albrecht Schlosser Feb 16, 2021  
 

While there's no warnings ... in VS 2017, ... there's three warnings VS 2019

This is an interesting point. Do we really want to "fix" all these warnings, and even more for the next incantation of VS (presumably VS 2021, this year). I think this is a race we can't win...

That said, many of the warnings are due to extending to 64-bit systems and particularly Microsoft's way to keep sizeof(long) == 4 rather than 8 like the "Unix world" did. I can see how such warnings can be helpful in some cases, but all the code we're usually dealing with does typically not suffer from such effects like "conversion from 'size_t' to 'int', possible loss of data". OTOH, if you "cast away" such warnings w/o checking that this is really intended you will never be warned again.

I'm not sure what to do though. I attempt to keep my daily (regular) builds clean of warnings (which is in my case mainly Linux) and I tend to suppress the warnings on VS builds.

Finally it can be "dangerous" to try to "fix" such warnings as seen above. S**t can happen, setting parens wrong, doing the wrong cast, etc., and if our macOS build wouldn't have issued a warning we might never have found this (although I think testing would likely have shown something going wrong - didn't bother to test though, but would be an interesting task...).


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.