added make target check-nonneg / generate (and fixed) all warnings in NONNEG build#7747
added make target check-nonneg / generate (and fixed) all warnings in NONNEG build#7747firewave merged 3 commits intodanmar:mainfrom
check-nonneg / generate (and fixed) all warnings in NONNEG build#7747Conversation
|
Yeah - I will make this a Make/CMake target. |
NONNEG buildcheck-nonneg / generate (and fixed) all warnings in NONNEG build
```
lib/astutils.cpp:115:23: error: comparison of unsigned expression in ‘< 0’ is always false [-Werror=type-limits]
115 | if (!tok || depth < 0)
| ~~~~~~^~~
```
|
I will add the CMake target in a follow-up. It is not as straight forward as I thought and it will most likely interfere with the pending CMake modernization. |
|
|
We should probably also run the tests with |
|
The output from the new target from https://github.com/danmar/cppcheck/actions/runs/17038518479/job/48296502830: |
I filed https://trac.cppcheck.net/ticket/14080 about this. |
|
|
||
| template<class T, class OuputIterator, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )> | ||
| static void astFlattenCopy(T* tok, const char* op, OuputIterator out, nonneg int depth = 100) | ||
| static void astFlattenCopy(T* tok, const char* op, OuputIterator out, int depth = 100) |
There was a problem hiding this comment.
spontanously I would have changed the code instead so it can't be negative.. but it doesn't matter much. I can accept this.



No description provided.