Message ID | 20201129160024.879-1-nick.connolly@mayadata.io |
---|---|
State | Accepted |
Delegated to: | Thomas Monjalon |
Headers | show |
Series |
|
Related | show |
Context | Check | Description |
---|---|---|
ci/travis-robot | success | Travis build: passed |
ci/iol-mellanox-Performance | success | Performance Testing PASS |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/iol-intel-Functional | success | Functional Testing PASS |
ci/iol-testing | success | Testing PASS |
ci/iol-broadcom-Functional | success | Functional Testing PASS |
ci/iol-broadcom-Performance | success | Performance Testing PASS |
ci/Intel-compilation | success | Compilation OK |
ci/checkpatch | warning | coding style issues |
On Sun, 29 Nov 2020 16:00:24 +0000, Nick Connolly wrote: > Microsoft CRT defines Windows-specific secure alternatives to > standard library functions and triggers warnings when "insecure" > functions are used [1]. However, calling code already has all > necessary checks around those functions, so these warnings are not > useful for DPDK. MinGW provides its own CRT without this issue. > > [1]: > https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160 > > Disable this by defining -D_CRT_SECURE_NO_WARNINGS. > > Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> > --- > v2: > * Adjust commit wording as per Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> > > Note: It is unclear exactly which commit this fixes. It is probably a > consequence of building more libraries for Windows. Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Hi Nick, Thanks for this patch. Could not see the deprecated warnings anymore. On 11/29/2020 8:00 AM, Nick Connolly wrote: > Microsoft CRT defines Windows-specific secure alternatives to > standard library functions and triggers warnings when "insecure" > functions are used [1]. However, calling code already has all > necessary checks around those functions, so these warnings are not > useful for DPDK. MinGW provides its own CRT without this issue. > > [1]: > https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160 > > Disable this by defining -D_CRT_SECURE_NO_WARNINGS. > > Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> > --- Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
03/12/2020 01:02, Dmitry Kozlyuk: > On Sun, 29 Nov 2020 16:00:24 +0000, Nick Connolly wrote: > > Microsoft CRT defines Windows-specific secure alternatives to > > standard library functions and triggers warnings when "insecure" > > functions are used [1]. However, calling code already has all > > necessary checks around those functions, so these warnings are not > > useful for DPDK. MinGW provides its own CRT without this issue. > > > > [1]: > > https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160 > > > > Disable this by defining -D_CRT_SECURE_NO_WARNINGS. > > > > Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> > > --- > > v2: > > * Adjust commit wording as per Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> > > > > Note: It is unclear exactly which commit this fixes. It is probably a > > consequence of building more libraries for Windows. > > Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Applied, thanks
Copying stable@dpdk.org - given that 20.11 has now been released I assume this needs to be applied there as well. On 07/12/2020 20:34, Thomas Monjalon wrote: > 03/12/2020 01:02, Dmitry Kozlyuk: >> On Sun, 29 Nov 2020 16:00:24 +0000, Nick Connolly wrote: >>> Microsoft CRT defines Windows-specific secure alternatives to >>> standard library functions and triggers warnings when "insecure" >>> functions are used [1]. However, calling code already has all >>> necessary checks around those functions, so these warnings are not >>> useful for DPDK. MinGW provides its own CRT without this issue. >>> >>> [1]: >>> https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160 >>> >>> Disable this by defining -D_CRT_SECURE_NO_WARNINGS. >>> >>> Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> >>> --- >>> v2: >>> * Adjust commit wording as per Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> >>> >>> Note: It is unclear exactly which commit this fixes. It is probably a >>> consequence of building more libraries for Windows. >> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> > Applied, thanks > >
diff --git a/config/meson.build b/config/meson.build index c02802c18..a3154e29c 100644 --- a/config/meson.build +++ b/config/meson.build @@ -279,6 +279,11 @@ if is_windows add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c') endif + # Disable secure CRT deprecated warnings for clang + if cc.get_id() == 'clang' + add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c') + endif + add_project_link_arguments('-lws2_32', language: 'c') # Contrary to docs, VirtualAlloc2() is exported by mincore.lib
Microsoft CRT defines Windows-specific secure alternatives to standard library functions and triggers warnings when "insecure" functions are used [1]. However, calling code already has all necessary checks around those functions, so these warnings are not useful for DPDK. MinGW provides its own CRT without this issue. [1]: https://docs.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160 Disable this by defining -D_CRT_SECURE_NO_WARNINGS. Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> --- v2: * Adjust commit wording as per Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Note: It is unclear exactly which commit this fixes. It is probably a consequence of building more libraries for Windows. config/meson.build | 5 +++++ 1 file changed, 5 insertions(+)