ocilib: Library compilation fails with MSVC 2022 version 17.2 (error C2220)
Hello, Iām a member of Microsoft VCPKG, when I built this port in an internal version of Visual Studio, it failed with following errors:
E:\0207\vcpkg\buildtrees\ocilib\x64-windows-rel\v4.7.3-f3f6b8726c.clean\src\array.c(300,71): error C2220: the following warning is treated as an error
E:\0207\vcpkg\buildtrees\ocilib\x64-windows-rel\v4.7.3-f3f6b8726c.clean\src\array.c(300,71): warning C4191: 'type cast': unsafe conversion from 'int (__cdecl *)(OCI_Array *,void **)' to 'POCI_LIST_FIND'
This is by design, need add the warning to the list of disabled warnings (/wd) to fix this error. Could you please fix this problem? If you need any information, please contact me directly. Thanks in advance.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (13 by maintainers)
Commits related to this issue
- Addressed issue #297 : disabling warning C4191 locally in code (despite vs2002 not reporting it) — committed to vrogier/ocilib by deleted user 2 years ago
- Applied change previously made for issue #297 to other places Refactored list macros and simplied code usage — committed to vrogier/ocilib by deleted user 2 years ago
- Disable C4191 when loading OCI symbols dynamically (#297) — committed to vrogier/ocilib by deleted user 2 years ago
Update pushed ! what will be the next C4191 suppression š ?
I committed a change that disable locally the given warning (that my vs complier does not fire, even if I see why it could be fired) and added a cast. As my compiler does not report the warning (prior the modification), let my know if does works for you.
thanks
Vincent
Hi,
Thanks for reporting this issue. I will commit a fix for it this week and will make a new release.
Regards,
Vincent