MantisBT - opensim
View Issue Details
0008457opensim[REGION] OpenSim Corepublic2019-01-18 08:042019-01-28 02:33
patch includedopen 
All Git master up to 2019-01-18 (at least)
Grid (Multiple Regions per Sim)
.NET / Windows32
0008457: Squish last compiler warning - Region\ScriptEngine\Shared\CodeTools\OpenSim.Region.ScriptEngine.Shared.CodeTools.csproj
On my Windows 10 setup when compiling I see just 1 warning in recent months... relating to an area of code in one test routine. One day it might be nice if someone understands this area of the code to try to squish that final outstanding warning :-)

"D:\Temp\opensim-\OpenSim.sln" (default target) (1) ->
.CoreModules.Tests.csproj" (default target) (46) ->
im.Region.ScriptEngine.XEngine.csproj" (default target) (47:2) ->
ols\OpenSim.Region.ScriptEngine.Shared.CodeTools.csproj" (default target) (50:2
) ->
(CoreCompile target) ->
  lsl.lexer.cs(19729,7): warning CS0162: Unreachable code detected [D:\Temp\ope
No tags attached.
diff Removed-unreachable-code-warning.diff (1,222) 2019-01-27 18:57
Issue History
2019-01-18 08:04aiaustinNew Issue
2019-01-18 08:07UbitUmarovNote Added: 0033839
2019-01-18 08:25tampaNote Added: 0033840
2019-01-18 09:48aiaustinNote Added: 0033841
2019-01-27 18:57tampaFile Added: Removed-unreachable-code-warning.diff
2019-01-27 18:58tampaNote Added: 0033963
2019-01-27 18:58tampaStatusnew => patch included
2019-01-28 01:45aiaustinNote Added: 0033964
2019-01-28 01:57tampaNote Added: 0033965
2019-01-28 02:30aiaustinNote Edited: 0033964bug_revision_view_page.php?bugnote_id=33964#r7659
2019-01-28 02:33aiaustinNote Added: 0033966
2019-01-28 02:33aiaustinNote Edited: 0033966bug_revision_view_page.php?bugnote_id=33966#r7661

2019-01-18 08:07   
the original author of the tools we use says its a normal warning
2019-01-18 08:25   
That's the lexer, Ubit once told me it was generated code so something not to touch. The position in question is a switch case break return thing where the break is not needed, it could be removed without breaking anything. I patched it out in my fork. On Linux this is not the last warning however, there are two more for already existing assemblies, that I don't know how to fix :)
2019-01-18 09:48   
2019-01-27 18:58   
Added patch just in case anyone wants to get rid of that warning for some reason. It can be safely ignored, though I agree that the more sane the build output the easier to spot any actual warnings hinting and broken code so...
2019-01-28 01:45   
(edited on: 2019-01-28 02:30)
Whooo… latest dev master (765 f107660 2019-01-28 07:47) has no compiler warnings on Windows 10. Thanks @tampa and @Ubit :-) [^]

2019-01-28 01:57   
Granted that SecurityManager.PolicyHierarchy() is still going to complain about being obsolete, however I have been unable to find any information on what it is replaced with or how to retrieve the policy levels. According to MS the method will not be in .Net5 or .NetE(as apparently that is to be its new name?) so it is unclear how long it will survive in mono or whether at some point it may cause execution errors. If anyone has an idea on what to replace it with feel free to write a patch. The code in question is located at: OpenSim\Region\OptionalModules\Scripting\Minimodule\MRMModule.cs(200,43)
2019-01-28 02:33   
I still find it odd that the download of dev master (which is internally versioned as Snail Dev) as a .zip file is given a file name of

I keep forgetting the reason for this.. as before the version number within the file name was changed (by Melanie?) when a release was taken out from dev master and dev master changed its version number.