View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001953 | NoesisGUI | C++ SDK | public | 2021-03-26 19:33 | 2021-03-29 18:33 |
Reporter | steveh | Assigned To | jsantos | ||
Priority | normal | Severity | trivial | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | 3.0.9 | ||||
Target Version | 3.0.12 | Fixed in Version | |||
Summary | 0001953: Compile error in Error.h when running static analysis | ||||
Description | Hi guys, just a simple typo caused by some compiler options when running static analysis: #ifndef NS_CHECK #ifdef _PREFAST_ #define NS_CHECK(expr, ...) __analysis_assume(!!(expr) #elif defined(__clang_analyzer__) #include <assert.h> #define NS_CHECK(expr, ...) assert(expr) #elif defined(NS_PROFILE) #define NS_CHECK(expr, ...) \ NS_MACRO_BEGIN \ if (NS_UNLIKELY(!(expr))) \ { \ Noesis::InvokeErrorHandler(__FILE__, __LINE__, false, __VA_ARGS__); \ } \ NS_MACRO_END #else #define NS_CHECK(...) NS_UNUSED(__VA_ARGS__) #endif #endif Specifically this bit here: #define NS_CHECK(expr, ...) __analysis_assume(!!(expr) It's missing a closing parenthesis. This will only cause an error if _PREFAST_ is defined which is only defined during static analysis. Adding the missing closing parenthesis fixed the compile error. | ||||
Steps To Reproduce | 1. Run static analysis 2. You should get a compile error here about unexpected EOF inline BaseRefCounted::~BaseRefCounted() { // Note that 1 is valid when the object lives is the stack or is being manually destroyed NS_CHECK(mRefCount == 1 || mRefCount == 0, "Unexpected RefCount(%d) deleting object at %p", (int32_t)mRefCount, this); } Cheers, -Steven | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-26 19:33 | steveh | New Issue | |
2021-03-29 10:56 | sfernandez | Assigned To | => jsantos |
2021-03-29 10:56 | sfernandez | Status | new => assigned |
2021-03-29 10:56 | sfernandez | Target Version | => 3.0.12 |
2021-03-29 18:33 | jsantos | Note Added: 0007114 |