Idea

Serge A avatar image
3 Likes"
Serge A suggested Serge A commented

Increase the default warning level of the DLL projects / fix SDK warnings

FlexSim Module DLL Projects generated by the Wizards available in the current SDK are configured to use warning level 2 (/W2):

Microsoft recommends using at least warning level 3 (/W3) for production, and level 4 (/W4) for new projects if possible.

However, if the project is configured to use /W3 level, the Visual Studio 2015 and 2017 compilers will emit 44 warnings in the SDK headers:

  • Multiple C4244, C4267 (conversion with a possible loss of data)
  • Multiple C4996 (use of unsafe functions like sprintf)

The number of SDK warnings on a new project goes up to 170 with /W4.

Most of these warnings are trivial to fix or suppress. It would be beneficial for the platform to use /W3 warning level in the new project templates, and fix SDK headers. I may prepare a pull request for https://bitbucket.org/flexsim/flexsim-module-sdk if necessary.

Edit: the bitbucket repo doesn't allow to submit pull requests, so I post a patch here: https://pastebin.com/AAgn5AqF

developmentdllc++sdk
renfq.png (22.6 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

No Comments

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.