Wireshark-dev: [Wireshark-dev] Re: Windows build failure

From: John Thacker <johnthacker@xxxxxxxxx>
Date: Fri, 16 May 2025 07:56:47 -0400
I updated to the latest version of Visual Studio and saw the same warnings. They should be fixed now.

On Thu, May 15, 2025, 12:34 PM John Thacker <johnthacker@xxxxxxxxx> wrote:
The following link does suggest that MSVC 17.14.0 had some changes around warning if enums weren't the same type:

https://developercommunity.visualstudio.com/t/warning-C5287:-operands-are-different-e/10877942

Though I think in our case we ought to be able to resolve it by fixing the casts or using values from the correct enums.

John


On Thu, May 15, 2025, 12:26 PM John Thacker <johnthacker@xxxxxxxxx> wrote:
I can see why all of those are warnings, as there's some incorrect casts or entries from the wrong enum (with the correct value, though) used. I suppose the latest MSVC is warning but the earlier versions don't.

John

On Thu, May 15, 2025, 10:05 AM Maynard, Chris via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> wrote:
I’m using Visual Studio 17.14.0 (MSVC 19.44.35207.1) and seeing warnings with master, which are causing a build failure.  It looks like https://gitlab.com/wireshark/wireshark/-/jobs/10045948387 is working fine, but it’s using MSVC 19.41.34123.0, so maybe that’s why it works there but not for me?  Anyone else seeing this?
 
       "C:\Wireshark\builds\x64\master\Wireshark.sln" (default target) (1) ->
       "C:\Wireshark\builds\x64\master\wireshark.vcxproj.metaproj" (default target
       ) (2) ->
       "C:\Wireshark\builds\x64\master\epan\epan.vcxproj.metaproj" (default target
       ) (7) ->
       "C:\Wireshark\builds\x64\master\epan\dissectors\dissectors.vcxproj.metaproj
       " (default target) (13) ->
       "C:\Wireshark\builds\x64\master\epan\dissectors\dissectors.vcxproj" (defaul
       t target) (111) ->
       (ClCompile target) ->
         C:\Wireshark\src\master\epan\dissectors\packet-netlink-generic.c(251,7):
       warning C5286: implicit conversion from enum type '<unnamed-enum-WS_CTRL_CM
       D_UNSPEC>' to enum type 'ws_genl_ctrl_attr'; use an explicit cast to silenc
       e this warning [C:\Wireshark\builds\x64\master\epan\dissectors\dissectors.v
       cxproj]
         C:\Wireshark\src\master\epan\dissectors\packet-netlink-net_dm.c(232,7): w
       arning C5286: implicit conversion from enum type 'ws_net_dm_attrs_stats' to
        enum type 'ws_net_dm_attrs_port'; use an explicit cast to silence this war
       ning [C:\Wireshark\builds\x64\master\epan\dissectors\dissectors.vcxproj]
         C:\Wireshark\src\master\epan\dissectors\packet-netlink-netfilter.c(580,8)
       : warning C5286: implicit conversion from enum type 'ws_ctattr_l4proto' to
       enum type 'ws_ctattr_ip'; use an explicit cast to silence this warning [C:\
       Wireshark\builds\x64\master\epan\dissectors\dissectors.vcxproj]
         C:\Wireshark\src\master\epan\dissectors\packet-netlink-netfilter.c(584,8)
       : warning C5286: implicit conversion from enum type 'ws_ctattr_l4proto' to
       enum type 'ws_ctattr_ip'; use an explicit cast to silence this warning [C:\
       Wireshark\builds\x64\master\epan\dissectors\dissectors.vcxproj]
         C:\Wireshark\src\master\epan\dissectors\packet-netlink-netfilter.c(588,8)
       : warning C5286: implicit conversion from enum type 'ws_ctattr_l4proto' to
       enum type 'ws_ctattr_ip'; use an explicit cast to silence this warning [C:\
       Wireshark\builds\x64\master\epan\dissectors\dissectors.vcxproj]
         C:\Wireshark\src\master\epan\dissectors\packet-tcpcl.c(1306,45): warning
       C5287: operands are different enum types 'Tcpclv3MessageType' and 'Tcpclv3D
       ataSegmentFlag'; use an explicit cast to silence this warning [C:\Wireshark
       \builds\x64\master\epan\dissectors\dissectors.vcxproj]
         C:\Wireshark\src\master\epan\dissectors\packet-netlink-netfilter.c(854,8)
       : warning C5286: implicit conversion from enum type 'ws_ctattr_expect_nat'
       to enum type 'ws_ctattr_expect'; use an explicit cast to silence this warni
       ng [C:\Wireshark\builds\x64\master\epan\dissectors\dissectors.vcxproj]
         C:\Wireshark\src\master\epan\dissectors\packet-netlink-netfilter.c(858,8)
       : warning C5286: implicit conversion from enum type 'ws_ctattr_expect_nat'
       to enum type 'ws_ctattr_expect'; use an explicit cast to silence this warni
       ng [C:\Wireshark\builds\x64\master\epan\dissectors\dissectors.vcxproj]
 
- Chris
 
 
 
 
 
 
CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain proprietary, confidential or trade secret information. This message is intended solely for the use of the addressee. If you are not the intended recipient and have received this message in error, please delete this message from your system. Any unauthorized reading, distribution, copying, or other use of this message or its attachments is strictly prohibited.
_______________________________________________
Wireshark-dev mailing list -- wireshark-dev@xxxxxxxxxxxxx
To unsubscribe send an email to wireshark-dev-leave@xxxxxxxxxxxxx