[ 
https://issues.apache.org/jira/browse/LUCENENET-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784225#action_12784225
 ] 

Corey Trager commented on LUCENENET-202:
----------------------------------------

I learned something new that might help folks agree.   Just now I removed the 
suppression of the warnings so that I could see for myself what was being 
suppressed.    Almost all the suppressed warnings had to do with XML 
documentation.   Then I noticed  in the project properties window a checkbox 
labeled "XML documentation file".   When I unchecked that, the number of 
warnings went from 2308 to 131.  Of the 131, the majority of them were:

 warning CS0168: The variable 'e' is declared but never used

Nothing bad will happen if this warning is suppressed.     In your codebase, 
it's almost always related to a catch (Exception e) where the e is not 
referenced in the catch block.   You can make the warning go away by changing 
(Exception e) to (Exception).

Would I personally suppress 0168?   No.   I personally would spend the 10 
minutes or so to change the (Exception e) to (Exception) to make the 0168 
warnings go away.   


> Compile warnings trying to build source code, svn revision 829945
> -----------------------------------------------------------------
>
>                 Key: LUCENENET-202
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-202
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: VS C# Express 2008.   A
>            Reporter: Corey Trager
>         Attachments: csproj.patch, LUCENENET-202.patch
>
>
> C:\cit\lucene\C#\src\Lucene.Net\Search\ComplexExplanation.cs(69,12): warning 
> CS0472: The result of the expression is always 'true' since a value of type 
> 'bool' is never equal to 'null' of type 'bool?'
> C:\cit\lucene\C#\src\Lucene.Net\Search\ComplexExplanation.cs(69,24): warning 
> CS0429: Unreachable expression code detected
> C:\cit\lucene\C#\src\Lucene.Net\Index\FormatPostingsDocsWriter.cs(42,17): 
> warning CS0649: Field 'Lucene.Net.Index.FormatPostingsDocsWriter.freqStart' 
> is never assigned to, and will always have its default value 0
> C:\cit\lucene\C#\src\Lucene.Net\Analysis\Standard\StandardTokenizerImpl.cs(230,15):
>  warning CS0414: The field 
> 'Lucene.Net.Analysis.Standard.StandardTokenizerImpl.yycolumn' is assigned but 
> its value is never used
> C:\cit\lucene\C#\src\Lucene.Net\Analysis\Standard\StandardTokenizerImpl.cs(233,16):
>  warning CS0414: The field 
> 'Lucene.Net.Analysis.Standard.StandardTokenizerImpl.zzAtBOL' is assigned but 
> its value is never used
> C:\cit\lucene\C#\src\Lucene.Net\Index\DocFieldProcessorPerThread.cs(42,18): 
> warning CS0649: Field 'Lucene.Net.Index.DocFieldProcessorPerThread.docBoost' 
> is never assigned to, and will always have its default value 0
> C:\cit\lucene\C#\src\Lucene.Net\Index\CharBlockPool.cs(31,16): warning 
> CS0649: Field 'Lucene.Net.Index.CharBlockPool.numBuffer' is never assigned 
> to, and will always have its default value 0
> C:\cit\lucene\C#\src\Lucene.Net\Store\NIOFSDirectory.cs(87,35): warning 
> CS0649: Field 'Lucene.Net.Store.NIOFSDirectory.NIOFSIndexInput.byteBuf' is 
> never assigned to, and will always have its default value null
> C:\cit\lucene\C#\src\Lucene.Net\Store\NIOFSDirectory.cs(90,35): warning 
> CS0649: Field 'Lucene.Net.Store.NIOFSDirectory.NIOFSIndexInput.otherByteBuf' 
> is never assigned to, and will always have its default value null
> C:\cit\lucene\C#\src\Lucene.Net\Analysis\CharReader.cs(32,35): warning 
> CS0649: Field 'Lucene.Net.Analysis.CharReader.input' is never assigned to, 
> and will always have its default value null
> C:\cit\lucene\C#\src\Lucene.Net\Index\DocumentsWriter.cs(181,37): warning 
> CS0649: Field 'Lucene.Net.Index.DocumentsWriter.newFiles' is never assigned 
> to, and will always have its default value null
> C:\cit\lucene\C#\src\Lucene.Net\Index\TermVectorsTermsWriter.cs(35,30): 
> warning CS0649: Field 
> 'Lucene.Net.Index.TermVectorsTermsWriter.termVectorsWriter' is never assigned 
> to, and will always have its default value null
> C:\cit\lucene\C#\src\Lucene.Net\Index\TermsHash.cs(43,21): warning CS0169: 
> The field 'Lucene.Net.Index.TermsHash.primaryTermsHash' is never used

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to