Skip to content

avoid -Wuseless-cast GCC warnings with TinyXML-2#7499

Merged
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
firewave:gcc-warn
May 1, 2025
Merged

avoid -Wuseless-cast GCC warnings with TinyXML-2#7499
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
firewave:gcc-warn

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented May 1, 2025

In file included from /home/user/cppcheck/externals/tinyxml2/tinyxml2.cpp:24:
/home/user/cppcheck/externals/tinyxml2/tinyxml2.h:442:26: warning: useless cast to type ‘size_t’ {aka ‘long unsigned int’} [-Wuseless-cast]
  442 |         char    itemData[static_cast<size_t>(ITEM_SIZE)];
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```
In file included from /home/user/cppcheck/externals/tinyxml2/tinyxml2.cpp:24:
/home/user/cppcheck/externals/tinyxml2/tinyxml2.h:442:26: warning: useless cast to type ‘size_t’ {aka ‘long unsigned int’} [-Wuseless-cast]
  442 |         char    itemData[static_cast<size_t>(ITEM_SIZE)];
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
@chrchr-github chrchr-github merged commit 0258e15 into cppcheck-opensource:main May 1, 2025
53 checks passed
@firewave firewave deleted the gcc-warn branch May 1, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants