Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 473360

Summary: x11-apps/intel-gpu-tools-1.3 fails to compile because index-out-of bounds warning is treated as error
Product: Gentoo Linux Reporter: Gert Wollny <gw.fossdev>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED NEEDINFO    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Att extra check to renmove the warning

Description Gert Wollny 2013-06-15 11:21:24 UTC
x11-apps/intel-gpu-tools-1.3 fails to compile because the index-out-of bounds warning is treated as error and in intel_infoframes.c:274 the compiler finds such an instance. 
Practically it can never happen, and this is indicated by an assertion, but at least gcc-4.6.4 doesn't see this and reports the warning. Since this warning is set to be treated as error, the build fails.



Reproducible: Always




The attached patch fixes this.
Comment 1 Gert Wollny 2013-06-15 11:22:58 UTC
Created attachment 350992 [details, diff]
Att extra check to renmove the warning

The patch adds an extra test to ensure that the array is not indexed with an out-of-bounds value.
Comment 2 SpanKY gentoo-dev 2014-07-31 05:54:52 UTC
can you post a full build log please ?  warnings shouldn't trigger errors ...
Comment 3 Gert Wollny 2014-08-01 19:08:47 UTC
Sorry, but I moved away from Gentoo on that Laptop. 

The package has a --enable-strict-compilation option that sets the -Werror compile flag. Maybe this got enable somehow.

Anyway, it is always a good idea to fix a warning :)