Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365522

Summary: false positives for "No return in function returning non-void" in cygwin sources
Product: [Tools] CDT Reporter: Matt Hargett <matt>
Component: cdt-codanAssignee: CDT Codan Inbox <cdt-codan-inbox>
Status: RESOLVED WORKSFORME QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, yevshif, zeratul976
Version: 8.1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Matt Hargett CLA 2011-12-04 10:03:26 EST
Build Identifier: 20111110-1543

in advapi32.cc from Cygwin CVS:
	VOID Offset(REAL dx, REAL dy) {
		X += dx;
		Y += dy;
	}

where Eclipse correctly resolves "VOID" to be a macro that is "void". So, the function actually is void and CODAN should not flag it's lack of return as an issue. (I'm surprised, since this bug makes it look like CODAN is analyzing the AST before pre-processing occurs.)

Reproducible: Always
Comment 1 Nathan Ridge CLA 2013-07-17 22:07:21 EDT
I get no warning with CDT 8.2 (Kepler).
Comment 2 Nathan Ridge CLA 2016-12-29 18:26:56 EST
Closing per comment 1. Feel free to reopen if you're still seeing this.