Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008336opensim[MISC] Compiling / Buildingpublic2018-07-11 02:572018-07-11 06:59
ReporterGarmin Kawaguichi 
Assigned ToUbitUmarov 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version0.9.0.1 
Target VersionFixed in Version 
Summary0008336: Just for fun
DescriptionOpenSim\Region\ScriptEngine\Shared\CodeTools\lsl.lexer.cs

Line 19728-19729 in public override TOKEN OldAction(Lexer yym,ref string yytext,int action, ref bool reject) {

We have found:
   case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); }
      break;

A break after a return ? Yeap… but no !
(IV)
 
TagsNo tags attached.
Git Revision or version number
Run Mode Standalone (Multiple Regions)
Physics EngineBulletSim
Environment.NET / Windows64
Mono VersionNone
Viewer
Attached Files

- Relationships

-  Notes
(0032764)
UbitUmarov (administrator)
2018-07-11 03:35

may look ugly but ok
specially on a generated file


you may also find it no other places
(0032765)
Fly-Man- (developer)
2018-07-11 03:35

That break is there for a reason, the LSL Lexer creator has explained that it's a known warning and wont be fixed.
(0032768)
Garmin Kawaguichi (reporter)
2018-07-11 05:06

Ok I understand that, but he could write something like that to avoid the warning::

   case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); }
#pragma warning disable CS0162 // Unreachable code detected
      break;
#pragma warning restore CS0162 // Unreachable code detected
   case 1027: { ((LSLTokens)yym).str += '\\'; }
--------------
In addition, a class name must start with a capital letter
Line 381
public class yyLSLTokens : YyLexer {
--------------
(IV)
(0032770)
tampa (reporter)
2018-07-11 05:39

You could be a bit more descriptive with your titles so they actually make sense in review. If you are going through the code just to find the small naming failures and other odd code then you are in for some fun. Would make more sense to spend the effort toward improving the almost decade old documentation and actually document some of the code and functionality that has yet to even receive documentation. :)
(0032772)
Garmin Kawaguichi (reporter)
2018-07-11 05:51

Sure, you're right! But it's more fun to have a compilation with no error, no warning and no message.
If not, it means that something you have done has impacted the code elsewhere (assuming that you have previously considered errors in your changes).

(IV)
(0032773)
tampa (reporter)
2018-07-11 06:06

Warngins =/= bad code, depending on which compiler you use and how your build environment is configured you may get more or less. Historically there were almost ten times the warnings, I pushed last year to have most of them cleared out so the actual issues would become more apparent later on, you can go back to the commits about the "Pesky warnings".

Very few issues actually stem from compile warnings now, most of what I encounter is generally to do with code that was either rushed or not well planned, little things here and there, again just read some recent commits. What functionality there should be vs. what there actually is, that's pretty much the phase the project is in currently.

Feel free to join the irc channel on freenode #opensim-dev if you want to discuss more about the current status of the project and where help and testing may be needed :)
(0032774)
UbitUmarov (administrator)
2018-07-11 06:59

warnings are just that warnings.
some may be very relevant, others not really
keeping them low improves the visibilty of the most relevant ones.

like fly-man said this one is on a generated file, and the author of the tool refers it as "feature"


and opensim without any warning? ppl whould not accept it as valid opensim
;)

and i can make some 3000 to so showup on this same code...
(0032775)
UbitUmarov (administrator)
2018-07-11 06:59

pet warning

- Issue History
Date Modified Username Field Change
2018-07-11 02:57 Garmin Kawaguichi New Issue
2018-07-11 03:35 UbitUmarov Note Added: 0032764
2018-07-11 03:35 Fly-Man- Note Added: 0032765
2018-07-11 03:35 Fly-Man- Status new => acknowledged
2018-07-11 05:06 Garmin Kawaguichi Note Added: 0032768
2018-07-11 05:39 tampa Note Added: 0032770
2018-07-11 05:51 Garmin Kawaguichi Note Added: 0032772
2018-07-11 06:06 tampa Note Added: 0032773
2018-07-11 06:59 UbitUmarov Note Added: 0032774
2018-07-11 06:59 UbitUmarov Note Added: 0032775
2018-07-11 06:59 UbitUmarov Status acknowledged => resolved
2018-07-11 06:59 UbitUmarov Resolution open => fixed
2018-07-11 06:59 UbitUmarov Assigned To => UbitUmarov


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker