| Summary: | False warning about Unused static function in template | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Axel Mueller <aegges> |
| Component: | cdt-codan | Assignee: | Nathan Ridge <zeratul976> |
| Status: | RESOLVED FIXED | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | angvoz.dev, cdtdoug, eclipse.sprigogin, malaperle, yevshif, zeratul976 |
| Version: | 8.1.1 | ||
| Target Milestone: | 8.3.0 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
Nathan, you looked at this checker recently. Would be this one easy to fix? (In reply to comment #1) > Nathan, you looked at this checker recently. Would be this one easy to fix? I will have a look. This has been annoying me, too. Turned out to be quite straightforward. Patch: https://git.eclipse.org/r/#/c/14680/ Fixed in master. |
Build Identifier: CDT 8.0 Testcode: static inline void add( float * f) { f += 1.0F; } static inline void add( int * f) { f += 1; } template<typename T> static inline void Myadd( T* Val) { add( Val); } int main() { int a = 5; MyAdd(&a); return 0; } CODAN reports "Unused static function" for both static functions add. Reproducible: Always