cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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):

7072-renfq.png

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

2 Comments

Sergey, I gave you read access to the module sdk repository. There doesn't seem to be a setting for allowing pull requests, as far as I can tell, so maybe giving you read access gives you the ability to create a pull request.

sastanin
Collaborator

Thank you Anthony. I was still not able to create a PR, but I made the fork public, so you can pull the changes manually: https://bitbucket.org/astanin/flexsim-module-sdk/commits/1ddb492811f8def2d2787344e18437cc1f31df71

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea