| Warnings in CDT [message #61236] | 
Wed, 05 February 2003 14:20   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: spam.eclipse.mooreclan.us 
 
This is a multi-part message in MIME format. 
 
------=_NextPart_000_001A_01C2CD08.A6C20200 
Content-Type: text/plain; 
	charset="iso-8859-1" 
Content-Transfer-Encoding: quoted-printable 
 
I just checked out the HEAD rev of cdt and have gotten it to compile.  = 
What concerns me is that there are a large number of warnings "The = 
static method/field Xxx from the type Yyy should be accessed in a static = 
way" 
 
For example, at line 35 in CStructurizer.java, the ReInit method is = 
accessed by dereferencing fParser.  Shouldn't 
 
    fParser.ReInit(lpiStream); 
 
look more like this: 
 
    CPPParser.ReInit(lpiStream); 
 
While I'm at it, shouldn't developers that checkin code with compiler = 
warnings be threatened with bamboo shoots under their fingernails? 
 
-MM (mark.moore@notlimited.com) 
------=_NextPart_000_001A_01C2CD08.A6C20200 
Content-Type: text/html; 
	charset="iso-8859-1" 
Content-Transfer-Encoding: quoted-printable 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML><HEAD> 
<META http-equiv=3DContent-Type content=3D"text/html; = 
charset=3Diso-8859-1"> 
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR> 
<STYLE></STYLE> 
</HEAD> 
<BODY bgColor=3D#ffffff> 
<DIV><FONT face=3DArial size=3D2>I just checked out the HEAD rev of cdt = 
and have=20 
gotten it to compile.  What concerns me is that there are a large = 
number of=20 
warnings "The static method/field Xxx from the type Yyy should be = 
accessed in a=20 
static way"</FONT></DIV> 
<DIV><FONT face=3DArial size=3D2></FONT> </DIV> 
<DIV><FONT face=3DArial size=3D2>For example, at line 35 in = 
CStructurizer.java, the=20 
ReInit method is accessed by dereferencing fParser.  = 
Shouldn't</FONT></DIV> 
<DIV><FONT face=3DArial size=3D2></FONT> </DIV> 
<DIV><FONT face=3DArial size=3D2>    <FONT=20 
size=3D2>fParser.ReInit(lpiStream);</FONT></FONT></DIV> 
<DIV><FONT face=3DArial size=3D2></FONT> </DIV> 
<DIV><FONT face=3DArial size=3D2>look more like this:</FONT></DIV> 
<DIV><FONT face=3DArial size=3D2></FONT> </DIV> 
<DIV><FONT face=3DArial size=3D2>    <FONT=20 
size=3D2>CPPParser.ReInit(lpiStream);</FONT></FONT></DIV > 
<DIV><FONT face=3DArial size=3D2></FONT> </DIV> 
<DIV><FONT face=3DArial size=3D2>While I'm at it, shouldn't developers = 
that checkin=20 
code with compiler warnings be threatened with bamboo shoots under their = 
 
fingernails?</FONT></DIV> 
<DIV><FONT face=3DArial size=3D2></FONT> </DIV> 
<DIV><FONT face=3DArial size=3D2>-MM=20 
(mark.moore@notlimited.com)</FONT></DIV></BODY></HTML> 
 
------=_NextPart_000_001A_01C2CD08.A6C20200--
 |  
 |  
  | 
 | 
| Re: Warnings in CDT [message #61384 is a reply to message #61264] | 
Thu, 06 February 2003 15:57   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: alain.no.spam 
 
Ed Burnette wrote: 
 
> I believe that warning used to be turned off by default in Eclipse 2.0.x 
> where CDT was originally developed. I had the same problem and "fixed" it by 
> turning the warning back off. Personally I don't see the problem with 
> accessing static things in a non-static way - why should I have to care if 
> the programmer made them static or not? 
 
> Don't be suprised if you see a few 'deprecated' warnings too. Unlike the 
> main body (Platform SDK) of Eclipse, CDT currently has to work with more 
> than one version of Eclipse so it doesn't have the luxury of upgrading to 
> new interfaces that might not be there in old versions of Eclipse. 
 
Agree 300 % with this. 
 
Warnings are indicators from the compiler, not end goals. 
As the developers move to 2.1, they clean up when necessary. 
We did the same drill when doing Eclipse-1.x --> Eclipse-2.0.x 
 
Second point, the bulk of warnings is actually 
generated code by JavaCC(think yacc/lex), CPPParser.java. 
This code is automatically generated so, you do not want 
to mess with it. 
 
> "Mark Moore" <spam.eclipse@mooreclan.us> wrote in message 
> news:b1rmtv$ri4$1@rogue.oti.com... 
> > I just checked out the HEAD rev of cdt and have gotten it to compile. 
> What concerns me is that there are a large 
> > number of warnings "The static method/field Xxx from the type Yyy should 
> be accessed in a static way"
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.03773 seconds