Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Expression *getVarExp(Loc loc, InterState *istate,
- Declaration *d, CtfeGoal goal)
- {
- ....
- VarDeclaration *v = d->isVarDeclaration();
- if (v)
- {
- ....
- }
- else if (s)
- {
- if (s->dsym->toInitializer() == s->sym)
- ....
- else
- error(loc,
- "cannot interpret symbol %s at compile time",
- v->toChars());
- }
- ....
- }
- This suspicious code was found in dmd-project project by PVS-Studio static code analyzer.
- Warning message is:
- V522 Dereferencing of the null pointer 'v' might take place. interpret.c 1711
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment