OpenSolaris

Printable Version Enter a New Search
Bug ID 6309967
Synopsis gcc and esp don't get along
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:driver-esp
Keywords non-regression | oss-bite-size | other_escape | tonic-gcc | triaged
Sponsor
Submitter
Responsible Engineer An Bui
Reported Against
Duplicate Of
Introduced In
Commit to Fix snv_29
Fixed In snv_29
Release Fixed solaris_nevada(snv_29)
Related Bugs
Submit Date 11-August-2005
Last Update Date 3-December-2005
Description
The esp driver triggers warnings when built with gcc.  There are three
reasons:

1. Two useless comparisons of esp->e_tagQ[slot]->e_tags >= NTAGS.  The
variable is a uchar_t, and NTAGS is 256; the comparison is always false
and therefore unnecessary.

2. No return value from esp_finish_select().  gcc doesn't understand NOTREACHED
and expects all paths through a function to return a value.

3. An assignment with ambiguous side effects (z = --z ...;).  Even if
this works, it's less than obvious and should be cleaned up.  A clearer
writing suppresses the warning.

See suggested fix for more detail.

[oss-bite-size]
Work Around
N/A
Comments
N/A