iODBC icon indicating copy to clipboard operation
iODBC copied to clipboard

Mismatched types for ValidDSNW parameter

Open jamesjer opened this issue 11 months ago • 1 comments

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.

jamesjer avatar Jan 15 '25 15:01 jamesjer

This issue has already been fixed with commit de87bb7d71e84c93a7f13fb8d09121d690f59e9c on the develop branch.

pkleef avatar Jan 15 '25 15:01 pkleef