From d96f414878440753a00ea514ca0aaf962b874b1c Mon Sep 17 00:00:00 2001
From: John Hodge <tpg@mutabah.net>
Date: Sat, 23 Jan 2016 21:28:37 +0800
Subject: [PATCH] Kernel - Clean up clang compile warnings

---
 KernelLand/Kernel/vfs/fs/root.c          | 4 ++--
 KernelLand/Modules/Filesystems/FAT/dir.c | 2 +-
 KernelLand/Modules/IPStack/tcp.c         | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/KernelLand/Kernel/vfs/fs/root.c b/KernelLand/Kernel/vfs/fs/root.c
index b8202977..47733050 100644
--- a/KernelLand/Kernel/vfs/fs/root.c
+++ b/KernelLand/Kernel/vfs/fs/root.c
@@ -36,12 +36,12 @@ tRamFS_File	RootFS_Files[MAX_FILES];
 tVFS_ACL	RootFS_DirACLs[3] = {
 	{{0,0}, {0,VFS_PERM_ALL}},	// Owner (Root)
 	{{1,0}, {0,VFS_PERM_ALL}},	// Group (Root)
-	{{0,-1}, {0,VFS_PERM_ALL^VFS_PERM_WRITE}}	// World (Nobody)
+	{VFS_USER_NOBODY, {0,VFS_PERM_ALL^VFS_PERM_WRITE}}	// World (Nobody)
 };
 tVFS_ACL	RootFS_FileACLs[3] = {
 	{{0,0}, {0,VFS_PERM_ALL^VFS_PERM_EXEC}},	// Owner (Root)
 	{{1,0}, {0,VFS_PERM_ALL^VFS_PERM_EXEC}},	// Group (Root)
-	{{0,-1}, {0,VFS_PERM_READ}}	// World (Nobody)
+	{VFS_USER_NOBODY, {0,VFS_PERM_READ}}	// World (Nobody)
 };
 tVFS_NodeType	gRootFS_DirType = {
 	.TypeName = "RootFS-Dir",
diff --git a/KernelLand/Modules/Filesystems/FAT/dir.c b/KernelLand/Modules/Filesystems/FAT/dir.c
index f5445fd5..aecce4fc 100644
--- a/KernelLand/Modules/Filesystems/FAT/dir.c
+++ b/KernelLand/Modules/Filesystems/FAT/dir.c
@@ -734,7 +734,7 @@ tVFS_Node *FAT_Mknod(tVFS_Node *DirNode, const char *Name, Uint Flags)
 /**
  * \brief Internal - Checks if a character is valid in an 8.3 filename
  */
-static inline int is_valid_83_char(char ch)
+static inline int is_valid_83_char(unsigned char ch)
 {
 	if( '0' <= ch && ch <= '9' )
 		return 1;
diff --git a/KernelLand/Modules/IPStack/tcp.c b/KernelLand/Modules/IPStack/tcp.c
index 2854f30a..0e23d0bc 100644
--- a/KernelLand/Modules/IPStack/tcp.c
+++ b/KernelLand/Modules/IPStack/tcp.c
@@ -1432,7 +1432,7 @@ int TCP_Client_IOCtl(tVFS_Node *Node, int ID, void *Data)
 	case 7:	// Connect
 		if(conn->LocalPort == 0xFFFF)
 			conn->LocalPort = TCP_GetUnusedPort();
-		if(conn->RemotePort == -1)
+		if(conn->RemotePort == 0xFFFF)
 			LEAVE_RET('i', 0);
 
 		{
-- 
GitLab