-
-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strncpy error in VS2013 #34
Comments
Hmm, interesting. I believe my use of |
I've researched this, it seems to be VS2013 (and VS2012) complaining about simple things like BTW I'm using the cpp wrapper. What happens if the ini file is malformed? Can I detect that with Thanks. |
@benhoyt yes, and identify windows with #ifdef _WIN32 |
@benhoyt: Yes, it's safe here. A solution could be for users to define @AgostinoSturaro: You're mistaken. MS doesn't implement those C11 functions (yet). There are many differences between them. @andravin: This has nothing to do with Windows itself. There are also other C compilers and standard libraries for Windows. |
OK, if the strncpy warning is MSVC only, then instead of checking for MS Windows with #ifdef _WIN32, you can check for the MSVC compiler using #ifdef _MSC_VER I don't think requiring the user to define _CRT_SECURE_NO_WARNINGS is an acceptable solution. |
That's only one line ( |
Okay, I'm happy to add this to ini.c -- I'll do this in the next few days:
|
I don't have ready access to MSVC right now -- can someone please try adding the above #ifdef dance before the #includes in ini.c and ensure the warning goes away? If so, feel free to send a pull request. |
Fixed in c3458c9 and created release r31 with fix: https://github.com/benhoyt/inih/releases/tag/r31 |
This library seems promising, with tests and all.
When I tried your example in Visual Studio 2013, I got this error
I'd rather not use have to set permissive flags just for this bit.
The text was updated successfully, but these errors were encountered: