Closed Memphiz closed 12 years ago
Very nice work, the stdcall seems plain wrong and snprintf is a very good point that MinGW fixes automatically. However I'm a bit worried that it has so many forced casts, they should not be necessary since in C (unlike C++) void * can be assigned to any pointer type. Have you tried getting rid of the warnings by changing Visual Studio settings? I found the following for Visual Studio .NET:
Would this fix the casting issues without modifications to the code?
I don't think so, because the project setting is set to "default" which means it compiles .c files as C Code and .cpp files as C++ code.
Though this are only warnings. There are a bunch of other warnings due to type truncation i didn't even try to fix ;)
Hmm, I'm looking at the Microsoft documentation at http://msdn.microsoft.com/en-us/library/6ewkz86d(v=vs.80).aspx and they don't seem to cast the return pointer on C code either. How about including malloc.h on Windows, could it fix the problem?
Mhhh strange ... it complained on my visual studio 2010 pro at work - but doesn't with my visual studio 2010 express at home - using he same project on both. I guess i do a new pr then without these casts?
I've changed the pull request and removed the unneeded castings. I've cleared some warnings though.
Thank you for the patch!
...ination of some warnings...