That's mostly patch to clean-up warnings - there are some left, but
mostly have some real meaning (not called handles, special stubs, or
just stuff left for later implementation).
+ Tokenizer detected negative values, but ignored that - hopefully corrected.
Index: Kernel/Core/PageAllocator.cs
===================================================================
--- Kernel/Core/PageAllocator.cs (wersja 713)
+++ Kernel/Core/PageAllocator.cs (kopia robocza)
@@ -246,8 +246,6 @@
/// </summary>
public static void* Alloc ()
{
- void* page = null;
-
return PopFreePage ();
}
Index: Kernel/Core/Korlib/System/String.cs
===================================================================
--- Kernel/Core/Korlib/System/String.cs (wersja 713)
+++ Kernel/Core/Korlib/System/String.cs (kopia robocza)
@@ -54,7 +54,7 @@
string str2 = "US";
string str3 = "Longer String Than Most";
- if (str.Length == 5)
+ if ((str.Length == 5) && (str2.Length == 2) && (str3.Length == 23))
TextMode.WriteLine ("System.String.Length: test passed");
else
TextMode.WriteLine ("System.String.Length: test FAILED");
Index: Kernel/Core/ADC/X86/PCI.cs
===================================================================
--- Kernel/Core/ADC/X86/PCI.cs (wersja 713)
+++ Kernel/Core/ADC/X86/PCI.cs (kopia robocza)
@@ -40,15 +40,15 @@
id = ReadConfig32(bus, dev, fun, 0);
if(id != 0xffffffff) {
ADC.TextMode.Write("bus:dev:fun -> ");
- ADC.TextMode.WriteNumber((int)bus);
+ ADC.TextMode.Write((int)bus);
ADC.TextMode.Write(":");
- ADC.TextMode.WriteNumber((int)dev);
+ ADC.TextMode.Write((int)dev);
ADC.TextMode.Write(":");
- ADC.TextMode.WriteNumber((int)fun);
+ ADC.TextMode.Write((int)fun);
ADC.TextMode.Write(" device ");
- ADC.TextMode.WriteNumber((int)(id&0xffff), true);
+ ADC.TextMode.Write((int)(id&0xffff), true);
ADC.TextMode.Write(":");
- ADC.TextMode.WriteNumber((int)((id>>16)&0xffff), true);
+ ADC.TextMode.Write((int)((id>>16)&0xffff), true);
ADC.TextMode.WriteLine();
}
Index: Kernel/Core/ADC/X86/Pager.cs
===================================================================
--- Kernel/Core/ADC/X86/Pager.cs (wersja 713)
+++ Kernel/Core/ADC/X86/Pager.cs (kopia robocza)
@@ -226,7 +226,7 @@
// Page directory needs to span all 4 GBs
// FIXME: What about PAE support might diffrent implementation
- uint totalPages = UInt32.MaxValue / 4096; // Each page spans of memory 4MB
+ // uint totalPages = UInt32.MaxValue / 4096; // Each page spans of memory 4MB
uint totalTables = 1024; // 1024 * 4MB = 4GB
Memory.MemSet32 (0, (uint) PageDirectory, 1024);
Index: Kernel/Core/KeyMap.cs
===================================================================
--- Kernel/Core/KeyMap.cs (wersja 713)
+++ Kernel/Core/KeyMap.cs (kopia robocza)
@@ -160,11 +160,9 @@
public static void WriteKeymaps ()
{
byte* table = (byte*) keymapArchive + 4;
- byte* ret_table;
byte* buf = getBuiltinKeyMapBuffer;
for (int x = 0; x < keymapEntries; ++x) {
- int nSize = 0;
int tSize = 0;
int error = 0;
int strSize = 0;
@@ -173,10 +171,7 @@
EntryModule.MaxKeyMapNameLength, &error);
table += strSize;
- nSize = ByteString.Length (buf);
- ret_table = table;
-
table += 2; // keymask/statebit
// default table
Index: Kernel/Core/Foundation/StringBuilder.cs
===================================================================
--- Kernel/Core/Foundation/StringBuilder.cs (wersja 713)
+++ Kernel/Core/Foundation/StringBuilder.cs (kopia robocza)
@@ -141,7 +141,6 @@
Diagnostics.Assert (count >= 0, "StringBuilder::Remove(int,int): Parameter 'count' is out of range");
Diagnostics.Assert ((startIndex + count) <= length, "StringBuilder::Remove(int,int): Parameter 'count' is out of range");
- int partA_first = 0;
int partA_last = startIndex - 1;
int partB_first = partA_last + count + 1;
@@ -167,8 +166,6 @@
public uint EnsureCapacity (uint minimumCapacity)
{
- uint thisLength = (uint) this.Length;
-
if (minimumCapacity > this.capacity) {
uint amountToExpand =
(((minimumCapacity - this.capacity) / DefaultCapacity) + 1)
Index: Tools/KeyCompiler/KeyCompiler.cs
===================================================================
--- Tools/KeyCompiler/KeyCompiler.cs (wersja 713)
+++ Tools/KeyCompiler/KeyCompiler.cs (kopia robocza)
@@ -114,7 +114,6 @@
void EncodeKeymap (Keymap map, BinaryWriter w)
{
- int encodedItems = 0;
int max = 0;
foreach (KeyValuePair<int, int> kvp in map.Entries) {
@@ -192,7 +191,6 @@
void EncodeKeymap (Keymap map, BinaryWriter w)
{
- int encodedItems = 0;
int max = 0;
foreach (KeyValuePair<int, int> kvp in map.Entries) {
@@ -290,8 +288,6 @@
sw.WriteLine ("default {");
foreach (KeyValuePair<int, int> kvp in defaultMap.Entries) {
- string val;
-
if (kvp.Value <= 128)
sw.WriteLine ("\t{0} = '{1}';", kvp.Key, (char) kvp.Value);
else
@@ -479,7 +475,6 @@
{
string content;
Tokenizer t;
- Token token;
int errors = 0;
int line, col;
@@ -584,8 +579,8 @@
public int ReadInt (Tokenizer t)
{
- bool neg = false, hex = false;
- int num = 0;
+ bool neg = false;
+ int num;
Token tok = t.Read ();
if (tok.Text == "-") {
@@ -620,7 +615,10 @@
} else
throw new UnexpectedTokenException (tok, "<number>");
- return num;
+ if (neg)
+ return -num;
+ else
+ return num;
}
public int ReadEqInt (Tokenizer t)
Index: Tools/KeyCompiler/Tokenizer.cs
===================================================================
--- Tools/KeyCompiler/Tokenizer.cs (wersja 713)
+++ Tools/KeyCompiler/Tokenizer.cs (kopia robocza)
@@ -480,7 +480,7 @@
char c = Text [_Caret];
- Token t = new Token (this, c, _Caret, _Line, _Column), orig = t;
+ Token t = new Token (this, c, _Caret, _Line, _Column);
if (StringMode)
return t; // it has just switched to, so return this and await string parsing.
Index: Tools/RuntimeCop/RuntimeCop.cs
===================================================================
--- Tools/RuntimeCop/RuntimeCop.cs (wersja 713)
+++ Tools/RuntimeCop/RuntimeCop.cs (kopia robocza)
@@ -79,7 +79,7 @@
try {
cop = new RuntimeCop (new CopOptions (args));
- } catch (ArgumentException e) {
+ } catch (ArgumentException) {
Console.Error.WriteLine ("Bad arguments, see -help");
return 1;
}
Index: AOT/Core/IR/Method.cs
===================================================================
--- AOT/Core/IR/Method.cs (wersja 713)
+++ AOT/Core/IR/Method.cs (kopia robocza)
@@ -740,8 +740,6 @@
/// </summary>
private void InternalPropagation ()
{
- List<Instructions.Instruction> remove = new List<SharpOS.AOT.IR.Instructions.Instruction> ();
-
foreach (Block block in this.blocks) {
foreach (Instructions.Instruction instruction in block) {
if (instruction is Instructions.Call) {
Index: AOT/Core/IR/Dump.cs
===================================================================
--- AOT/Core/IR/Dump.cs (wersja 713)
+++ AOT/Core/IR/Dump.cs (kopia robocza)
@@ -72,7 +72,7 @@
if (file != null) {
this.type |= (byte) DumpType.File;
- this.streamWriter = new StreamWriter (file);
+ this.streamWriter = new StreamWriter (this.file);
this.streamWriter.AutoFlush = true;
}
}
@@ -155,7 +155,7 @@
if (streamWriter != null)
streamWriter.Dispose ();
- } catch (Exception ex) {
+ } catch (Exception) {
//Console.WriteLine (ex.ToString ());
}
}
@@ -470,9 +470,6 @@
/// <param name="sect">The sect.</param>
public void Section (DumpSection sect)
{
- string tag = null;
- string text = null;
- string close_text = null;
bool addPrefix = true;
switch (sect) {
Index: AOT/Core/IR/Engine.cs
===================================================================
--- AOT/Core/IR/Engine.cs (wersja 713)
+++ AOT/Core/IR/Engine.cs (kopia robocza)
@@ -440,8 +440,6 @@
/// </summary>
public void Run ()
{
- DumpType dumpType = DumpType.XML;
-
IAssembly asm = null;
switch (options.CPU) {
@@ -453,7 +451,6 @@
throw new EngineException (string.Format (
"Error: processor type `{0}' not supported",
options.CPU));
- break;
}
Message (1, "AOT compiling for processor `{0}'", options.CPU);
@@ -711,7 +708,7 @@
continue;
}
- bool ignore = false;
+ // bool ignore = false;
string ignoreReason = null;
if (type.Name.Equals ("<Module>"))
@@ -725,7 +722,7 @@
Message (2, "Ignoring unused ADC type `{0}' in layer `{1}'",
type.FullName, layer.CPU);
- ignore = true;
+ // ignore = true;
ignoreReason = "Unused ADC implementation";
break;
}
Index: AOT/Core/IR/Block.cs
===================================================================
--- AOT/Core/IR/Block.cs (wersja 713)
+++ AOT/Core/IR/Block.cs (kopia robocza)
@@ -425,8 +425,6 @@
}
*/
foreach (Mono.Cecil.Cil.Instruction cilInstruction in this.cil) {
- int oldState = this.stack.Count;
-
Instructions.Instruction instruction = Block.ilDispatcher [(int) cilInstruction.OpCode.Code] (this, cilInstruction);
// Avoid System.Object::.ctor from calling itself
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers