Skip to content

Conversation

@firewave
Copy link
Collaborator

building with the GUI enabled will implicitly switch the standard to C++17.

/home/runner/work/cppcheck/cppcheck/lib/path.cpp: In function ‘bool hasEmacsCppMarker(const char*)’:
/home/runner/work/cppcheck/cppcheck/lib/path.cpp:246:40: error: useless cast to type ‘char*’ [-Werror=useless-cast]
  246 |         const char * const res = fgets(const_cast<char*>(buf.data()), buf.size(), fp);
      |

building with the GUI enabled will implicitly switch the standard to C++17.

```
/home/runner/work/cppcheck/cppcheck/lib/path.cpp: In function ‘bool hasEmacsCppMarker(const char*)’:
/home/runner/work/cppcheck/cppcheck/lib/path.cpp:246:40: error: useless cast to type ‘char*’ [-Werror=useless-cast]
  246 |         const char * const res = fgets(const_cast<char*>(buf.data()), buf.size(), fp);
      |
```
@sonarqubecloud
Copy link

@firewave firewave merged commit b413181 into danmar:main Aug 28, 2025
63 checks passed
@firewave firewave deleted the path-cast branch August 28, 2025 15:38
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