diff mbox series

[3/3] config/build: ignore enum forward reference warning

Message ID 20201205011020.6276-4-pallavi.kadam@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series Support i40e PMD on Windows | expand

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
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/checkpatch success coding style OK

Commit Message

Kadam, Pallavi Dec. 5, 2020, 1:10 a.m. UTC
Warning generated using Clang compiler:
..\drivers\net\i40e\base/i40e_osdep.h:34:14: warning: forward references
to 'enum' types are a Microsoft extension
[-Wmicrosoft-enum-forward-reference]
typedef enum i40e_status_code i40e_status;
             ^

Adding -Wmicrosoft-enum-forward-reference compiler flag to disable
the warning on Windows Clang.

Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
 config/meson.build | 3 +++
 1 file changed, 3 insertions(+)

Comments

Dmitry Kozlyuk Dec. 5, 2020, 1:51 p.m. UTC | #1
On Fri,  4 Dec 2020 17:10:20 -0800, Pallavi Kadam wrote:
> Warning generated using Clang compiler:
> ..\drivers\net\i40e\base/i40e_osdep.h:34:14: warning: forward references
> to 'enum' types are a Microsoft extension
> [-Wmicrosoft-enum-forward-reference]
> typedef enum i40e_status_code i40e_status;
>              ^
> 
> Adding -Wmicrosoft-enum-forward-reference compiler flag to disable
> the warning on Windows Clang.

@i40e maintainers,
Is this typedef necessary? Disabling a warning is usually the last resort.
Narcisa Ana Maria Vasile Dec. 10, 2020, 12:53 a.m. UTC | #2
On Fri, Dec 04, 2020 at 05:10:20PM -0800, Pallavi Kadam wrote:
> Warning generated using Clang compiler:
> ..\drivers\net\i40e\base/i40e_osdep.h:34:14: warning: forward references
> to 'enum' types are a Microsoft extension
> [-Wmicrosoft-enum-forward-reference]
> typedef enum i40e_status_code i40e_status;
>              ^
> 
> Adding -Wmicrosoft-enum-forward-reference compiler flag to disable
> the warning on Windows Clang.
> 
> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
> ---

Why not including the "i40e_status.h" header that contains the definition of the enum
in this file?
Kadam, Pallavi Dec. 17, 2020, 11:15 p.m. UTC | #3
On 12/9/2020 4:53 PM, Narcisa Ana Maria Vasile wrote:
> On Fri, Dec 04, 2020 at 05:10:20PM -0800, Pallavi Kadam wrote:
>> Warning generated using Clang compiler:
>> ..\drivers\net\i40e\base/i40e_osdep.h:34:14: warning: forward references
>> to 'enum' types are a Microsoft extension
>> [-Wmicrosoft-enum-forward-reference]
>> typedef enum i40e_status_code i40e_status;
>>               ^
>>
>> Adding -Wmicrosoft-enum-forward-reference compiler flag to disable
>> the warning on Windows Clang.
>>
>> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
>> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
>> ---
> Why not including the "i40e_status.h" header that contains the definition of the enum
> in this file?
Thanks, Naty. Added this header file in v2.
diff mbox series

Patch

diff --git a/config/meson.build b/config/meson.build
index c02802c18..6736023fa 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -212,6 +212,9 @@  warning_flags = [
 	'-Wno-packed-not-aligned',
 	'-Wno-missing-field-initializers'
 ]
+if is_windows
+	warning_flags += '-Wno-microsoft-enum-forward-reference'
+endif
 if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0')
 # FIXME: Bugzilla 396
 	warning_flags += '-Wno-zero-length-bounds'