I've a file of function definitions say xxx.h. This file is included and
used in other n files. Earlier this definition was static inline yyyy(){}.
Now after removing static this complains as "static unused"---Reang. On Wed, Aug 19, 2009 at 9:48 AM, Garrett D'Amore <[email protected]> wrote: > Reang Su wrote: > >> Hi Garrett, >> I tried without using /*LINTED */ initially, it didn't work. After >> removing static from my function definition I was still getting "warning: >> static unused", So I tried with /*LINTED */. >> Unfortunately this also didn't work. >> > > Lint pass two over a whole program might notice that the function is not > used. But if its a device driver, it should get by if you remove the > static, without a LINTED flag. The behavior you're describing is not one > I've ever seen. > > But again, if the function is static, and *not* used, then why have it in > the first place? > > - Garrett > >> Thank you, >> --Reang. >> >> >> On Tue, Aug 18, 2009 at 7:23 PM, Garrett D'Amore <[email protected]<mailto: >> [email protected]>> wrote: >> >> Reang Su wrote: >> >> Hi , >> I'm stuck while removing E_STATIC_UNUSED LINTTAG from my >> driver Makefile. >> Once I removed this LINTTAG in my Makefile I get following >> warning. >> xxx.h", line 85: warning: static unused: >> __hal_ifmsg_is_manager_up (E_STATIC_UNUSED) >> I removed static from my function definition and added >> /*LINTED */ before it. Now I get >> E_SUPPRESSION_DIRECTIVE_UNUSED on that line. >> xxx.h", line 85: warning: lint suppression directive not used >> (E_SUPPRESSION_DIRECTIVE_UNUSED) >> >> >> You shouldn't have also added /*LINTED*/. Since you removed the >> "static", you shouldn't have got the E_STATIC_UNUSED_LINTTAG anymore. >> >> Of course, if the function really was static, and not used >> anywhere, maybe you should have just removed it, and saved a >> little space in the code and in the binary. >> >> - Garrett >> >> Please suggest. >> Thank you, >> -Reang, >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> driver-discuss mailing list >> [email protected] >> <mailto:[email protected]> >> http://mail.opensolaris.org/mailman/listinfo/driver-discuss >> >> >> >> >
_______________________________________________ driver-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/driver-discuss
