[3/3] config/build: ignore enum forward reference warning
Checks
Commit Message
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
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.
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?
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.
@@ -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'