Open Thanatomanic opened 6 years ago
I don't get these two more warnings. Did you do a clean compilation?
Forgot to mention that this only happens when I make a debug
build (or relwithdeb
)
After some digging, I believe that the #define
's in dcraw.cc
are not necessary. The header string.h
is included, which already contains this tidbit:
#ifndef NO_OLDNAMES
char *__cdecl strdup(const char *_Src) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
int __cdecl strcmpi(const char *_Str1,const char *_Str2) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
int __cdecl stricmp(const char *_Str1,const char *_Str2) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
char *__cdecl strlwr(char *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
int __cdecl strnicmp(const char *_Str1,const char *_Str,size_t _MaxCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
int __cdecl strncasecmp (const char *, const char *, size_t);
int __cdecl strcasecmp (const char *, const char *);
#ifndef __CRT__NO_INLINE
__CRT_INLINE int __cdecl strncasecmp (const char *__sz1, const char *__sz2, size_t __sizeMaxCompare) { return _strnicmp (__sz1, __sz2, __sizeMaxCompare); }
__CRT_INLINE int __cdecl strcasecmp (const char *__sz1, const char *__sz2) { return _stricmp (__sz1, __sz2); }
#else
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#endif /* !__CRT__NO_INLINE */
char *__cdecl strnset(char *_Str,int _Val,size_t _MaxCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
char *__cdecl strrev(char *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
char *__cdecl strset(char *_Str,int _Val) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
char *__cdecl strupr(char *_Str) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
#endif
So the aliases seem to get defined anyway. Commenting them out gives no errors in compiling on my MSYS2 environment.
Actually, the proper functions to be used for case-insensitive string comparison seem to be _stricmp
and _strnicmp
. Would also be an easy change in the code. Outside of dcraw.cc
there are only two instances I could find that call either strncasecmp
or strcasecmp
.
When I try to build RT on Win10 using an up to date MSYS2, I was used to getting the following message:
However, recently (unsure as to when exactly), two more warnings started popping up.
Seems pretty harmless, but I guess it would be nicer if it didn't happen.