Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC Compiler warnings in Helpers.hh #527

Closed
Tracked by #892
scpeters opened this issue Mar 21, 2023 · 2 comments
Closed
Tracked by #892

MSVC Compiler warnings in Helpers.hh #527

scpeters opened this issue Mar 21, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@scpeters
Copy link
Member

Environment

  • OS Version: Windows 10
  • Source or binary build? source build of ign-math6

Description

  • Expected behavior: it should compiler without compiler warnings
  • Actual behavior: it has multiple compiler warnings about Helpers.hh line 254
C:\J\workspace\ign_math-ign-6-win\ws\gz-math\include\gz/math/Helpers.hh(954,20):
 warning C4834: discarding return value of function with 'nodiscard' attribute

Steps to reproduce

  1. Run a CI build on one of the newer windows hosts (such as win-ec2.nv.WinS22-9e6bbc45)

Output

Older MSVC version doesn't have compiler warnings

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.29.30143.0
-- The CXX compiler identification is MSVC 19.29.30143.0

Build Status https://build.osrfoundation.org/view/ign-citadel/job/ign_math-ign-6-win/67/

Newer MSVC version has compiler warnings

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.20348.
-- The C compiler identification is MSVC 19.33.31630.0
-- The CXX compiler identification is MSVC 19.33.31630.0

Build Status https://build.osrfoundation.org/view/ign-citadel/job/ign_math-ign-6-win/66/

C:\J\workspace\ign_math-ign-6-win\ws\gz-math\include\gz/math/Helpers.hh(954,20):
 warning C4834: discarding return value of function with 'nodiscard' attribute
 (compiling source file C:\J\workspace\ign_math-ign-6-win\ws\gz-math\src\Color.cc)
 [C:\J\workspace\ign_math-ign-6-win\ws\build\ignition-math6\src\ignition-math6.vcxproj]
@scpeters scpeters added the bug Something isn't working label Mar 21, 2023
@azeey azeey added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 30, 2023
@azeey azeey moved this to To do in Core development Jul 24, 2023
@sdhar04
Copy link

sdhar04 commented Mar 1, 2024

@azeey I would like to work on this issue. However, the links under Steps To Reproduce aren't working. Could you give me some pointers on how to tackle this? Should I remove the attribute 'nodiscard' of the given function?

@azeey
Copy link
Contributor

azeey commented Mar 1, 2024

Thanks for your interest @sdhar04. In trying to reproduce this myself, I found out that the issue has been resolved in #564. So, I'll go ahead and close it. Please feel free to find another "good first issue".

@azeey azeey closed this as completed Mar 1, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in Core development Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

3 participants