cppcheckexecutor.cpp: avoid -Wcast-qual warnings on macOS#7749
Merged
chrchr-github merged 1 commit intodanmar:mainfrom Aug 18, 2025
Merged
cppcheckexecutor.cpp: avoid -Wcast-qual warnings on macOS#7749chrchr-github merged 1 commit intodanmar:mainfrom
-Wcast-qual warnings on macOS#7749chrchr-github merged 1 commit intodanmar:mainfrom
Conversation
Collaborator
firewave
commented
Aug 18, 2025
```
/Users/runner/work/cppcheck/cppcheck/cli/cppcheckexecutor.cpp:746:9: error: cast from 'const int *' to 'int *' drops const qualifier [-Werror,-Wcast-qual]
746 | if (WIFEXITED(res)) {
| ^
[ 2%] Building CXX object lib/CMakeFiles/cppcheck-core.dir/symboldatabase.cpp.o
/Applications/Xcode_16.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/sys/wait.h:152:26: note: expanded from macro 'WIFEXITED'
152 | #define WIFEXITED(x) (_WSTATUS(x) == 0)
| ^
/Applications/Xcode_16.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/sys/wait.h:136:26: note: expanded from macro '_WSTATUS'
136 | #define _WSTATUS(x) (_W_INT(x) & 0177)
| ^
/Applications/Xcode_16.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/sys/wait.h:131:34: note: expanded from macro '_W_INT'
131 | #define _W_INT(w) (*(int *)&(w)) /* convert union wait to int */
| ^
```
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


