X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Freport.cs;h=afa4f75bd84865f72666678e53685c0c31df5462;hb=ab98a01bacfd291e332c370574d284b00a71768c;hp=74bbb46c640cf42053a1d096fd4472a61804934b;hpb=f0834d5407f492a2a21e2f62f8f8c418d64ba6fa;p=mono.git diff --git a/mcs/mcs/report.cs b/mcs/mcs/report.cs index 74bbb46c640..afa4f75bd84 100644 --- a/mcs/mcs/report.cs +++ b/mcs/mcs/report.cs @@ -61,12 +61,10 @@ namespace Mono.CSharp { 8009, 8094 }; - static HashSet AllWarningsHashSet; - public Report (CompilerContext context, ReportPrinter printer) { if (context == null) - throw new ArgumentNullException ("settings"); + throw new ArgumentNullException ("context"); if (printer == null) throw new ArgumentNullException ("printer"); @@ -175,18 +173,6 @@ namespace Mono.CSharp { extra_information.Add (msg); } - public bool CheckWarningCode (int code, Location loc) - { - if (AllWarningsHashSet == null) - AllWarningsHashSet = new HashSet (AllWarnings); - - if (AllWarningsHashSet.Contains (code)) - return true; - - Warning (1691, 1, loc, "`{0}' is not a valid warning number", code); - return false; - } - public void ExtraInformation (Location loc, string msg) { extra_information.Add (String.Format ("{0} {1}", loc, msg)); @@ -1109,8 +1095,7 @@ namespace Mono.CSharp { public void WarningDisable (Location location, int code, Report Report) { - if (Report.CheckWarningCode (code, location)) - regions.Add (new Disable (location.Row, code)); + regions.Add (new Disable (location.Row, code)); } public void WarningEnable (int line) @@ -1120,9 +1105,6 @@ namespace Mono.CSharp { public void WarningEnable (Location location, int code, CompilerContext context) { - if (!context.Report.CheckWarningCode (code, location)) - return; - if (context.Settings.IsWarningDisabledGlobally (code)) context.Report.Warning (1635, 1, location, "Cannot restore warning `CS{0:0000}' because it was disabled globally", code);