Browse Source

Remove some compiler warnings

Hugh Sanderson 13 years ago
parent
commit
1ad9b6d860
4 changed files with 4 additions and 2 deletions
  1. 1 0
      std/cpp/Lib.hx
  2. 1 1
      std/cpp/io/FileInput.hx
  3. 1 1
      std/cpp/io/FileOutput.hx
  4. 1 0
      std/cpp/io/Process.hx

+ 1 - 0
std/cpp/Lib.hx

@@ -54,6 +54,7 @@ class Lib {
 			default : return function(_1) { throw e; };
 			default : return function(_1) { throw e; };
 			}
 			}
 		}
 		}
+		return null;
 	}
 	}
 
 
 	public static function rethrow(inExp:Dynamic) { throw inExp; }
 	public static function rethrow(inExp:Dynamic) { throw inExp; }

+ 1 - 1
std/cpp/io/FileInput.hx

@@ -64,7 +64,7 @@ class FileInput extends haxe.io.Input {
 	}
 	}
 
 
 	public function seek( p : Int, pos : FileSeek ) {
 	public function seek( p : Int, pos : FileSeek ) {
-		file_seek(__f,p,switch( pos ) { case SeekBegin: 0; case SeekCur: 1; case SeekEnd: 2; });
+		file_seek(__f,p,pos==SeekBegin ? 0 : pos==SeekCur ? 1 :  2 );
 	}
 	}
 
 
 	public function tell() : Int {
 	public function tell() : Int {

+ 1 - 1
std/cpp/io/FileOutput.hx

@@ -54,7 +54,7 @@ class FileOutput extends haxe.io.Output {
 	}
 	}
 
 
 	public function seek( p : Int, pos : FileSeek ) {
 	public function seek( p : Int, pos : FileSeek ) {
-		file_seek(__f,p,switch( pos ) { case SeekBegin: 0; case SeekCur: 1; case SeekEnd: 2; });
+		file_seek(__f,p, pos == SeekBegin ? 0 : pos ==  SeekCur ? 1 : 2);
 	}
 	}
 
 
 	public function tell() : Int {
 	public function tell() : Int {

+ 1 - 0
std/cpp/io/Process.hx

@@ -50,6 +50,7 @@ private class Stdin extends haxe.io.Output {
 		} catch( e : Dynamic ) {
 		} catch( e : Dynamic ) {
 			throw new haxe.io.Eof();
 			throw new haxe.io.Eof();
 		}
 		}
+		return 0;
 	}
 	}
 
 
 	static var _stdin_write = cpp.Lib.load("std","process_stdin_write",4);
 	static var _stdin_write = cpp.Lib.load("std","process_stdin_write",4);