iODBC
iODBC copied to clipboard
Mismatched types for ValidDSNW parameter
When building with LTO, gcc warns:
SQLRemoveDSNFromIni.c:87:13: warning: type of 'ValidDSNW' does not match original declaration [-Wlto-type-mismatch]
87 | extern BOOL ValidDSNW (LPCSTR);
| ^
SQLValidDSN.c:105:1: note: 'ValidDSNW' was previously declared here
105 | ValidDSNW (LPCWSTR lpszDSN)
| ^
SQLValidDSN.c:105:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
The definition of ValidDSNW says that the argument has type LPCWSTR, but the prototype in SQLRemoveDSNFromIni.c says that it has type LPCSTR.
This issue has already been fixed with commit de87bb7d71e84c93a7f13fb8d09121d690f59e9c on the develop branch.