Skip to content

g++ (11) -Wuseless-cast gives lots of warnings #2893

Closed
@fhuberts

Description

@fhuberts

What is the issue you have?

When I compile the 'single include' file on g++ v11 on my Fedora 34 machine with the '-Wuseless-cast' flags enabled then I get lots of warnings.

Please describe the steps to reproduce the issue.

  1. enable the -Wuseless-cast compiler flag and compile

Can you provide a small but working code example?

What is the expected behavior?

And what is the actual behavior instead?

Which compiler and operating system are you using?

  • Compiler: gnu g++ v11
  • Operating system: Fedora 34 x64
g++ (GCC) 11.1.1 20210531 (Red Hat 11.1.1-3)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Which version of the library did you use?

  • latest release version 3.9.1
  • other release - please state the version: commit a563338
  • the develop branch

If you experience a compilation error: can you compile and run the unit tests?

  • yes
  • no - please copy/paste the error message below

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions