From: John Hodge Date: Thu, 12 Jul 2012 08:54:26 +0000 (+0800) Subject: Kernel - Fixing small errors exposed by new compiler X-Git-Tag: rel0.15~611^2~41^2~13 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=742983c97b5cd2e38df86cb0e51c7f483730ebc5;p=tpg%2Facess2.git Kernel - Fixing small errors exposed by new compiler --- diff --git a/KernelLand/Modules/IPStack/ipv6.c b/KernelLand/Modules/IPStack/ipv6.c index 7cb8e0a8..090e4c03 100644 --- a/KernelLand/Modules/IPStack/ipv6.c +++ b/KernelLand/Modules/IPStack/ipv6.c @@ -69,7 +69,7 @@ void IPv6_int_GetPacket(tAdapter *Adapter, tMacAddr From, int Length, void *Buff { tInterface *iface; tIPv6Header *hdr = Buffer; - int ret, dataLength; + int ret; char *dataPtr; Uint8 nextHeader; @@ -105,7 +105,6 @@ void IPv6_int_GetPacket(tAdapter *Adapter, tMacAddr From, int Length, void *Buff // Process Options nextHeader = hdr->NextHeader; dataPtr = hdr->Data; - dataLength = hdr->PayloadLength; for( ;; ) { struct { diff --git a/KernelLand/Modules/IPStack/link.c b/KernelLand/Modules/IPStack/link.c index 3dcd2949..c4f716f0 100644 --- a/KernelLand/Modules/IPStack/link.c +++ b/KernelLand/Modules/IPStack/link.c @@ -114,8 +114,6 @@ int Link_HandlePacket(tAdapter *Adapter, tIPStackBuffer *Buffer) void *data = IPStack_Buffer_CompactBuffer(Buffer, &len); tEthernetHeader *hdr = (void*)data; - int i; - Uint32 checksum; if(len < sizeof(tEthernetHeader)) { Log_Log("Net Link", "Recieved an undersized packet (%i < %i)", @@ -133,11 +131,12 @@ int Link_HandlePacket(tAdapter *Adapter, tIPStackBuffer *Buffer) hdr->Dest.B[3], hdr->Dest.B[4], hdr->Dest.B[5], ntohs(hdr->Type) ); - checksum = *(Uint32*)&hdr->Data[len-sizeof(tEthernetHeader)-4]; +// Uint32 checksum = *(Uint32*)(data + len + 4); //Log_Log("NET", "Checksum 0x%08x", checksum); // TODO: Check checksum // Check if there is a registered callback for this packet type + int i; for( i = giRegisteredTypes; i--; ) { if(gaRegisteredTypes[i].Type == ntohs(hdr->Type)) break; diff --git a/KernelLand/Modules/USB/Core/usb_lowlevel.c b/KernelLand/Modules/USB/Core/usb_lowlevel.c index 6b38e65e..dce7c33a 100644 --- a/KernelLand/Modules/USB/Core/usb_lowlevel.c +++ b/KernelLand/Modules/USB/Core/usb_lowlevel.c @@ -95,7 +95,6 @@ int USB_int_ReadDescriptor(tUSBDevice *Dev, int Endpoint, int Type, int Index, i const int ciMaxPacketSize = 0x400; struct sDeviceRequest req; int bToggle = 0; - void *final; int dest = Dev->Address*16 + Endpoint; ENTER("pDev xdest iType iIndex iLength pDest", @@ -131,7 +130,7 @@ int USB_int_ReadDescriptor(tUSBDevice *Dev, int Endpoint, int Type, int Index, i Threads_ClearEvent(THREAD_EVENT_SHORTWAIT); LOG("OUT (Status)"); - final = Dev->Host->HostDef->ControlOUT( + Dev->Host->HostDef->ControlOUT( Dev->Host->Ptr, dest, 1, USB_int_WakeThread, Proc_GetCurThread(), NULL, 0 diff --git a/KernelLand/Modules/x86/VGAText/vga.c b/KernelLand/Modules/x86/VGAText/vga.c index cc8fda38..d7ab474a 100644 --- a/KernelLand/Modules/x86/VGAText/vga.c +++ b/KernelLand/Modules/x86/VGAText/vga.c @@ -252,6 +252,7 @@ void VGA_2D_Fill(void *Ent, Uint16 X, Uint16 Y, Uint16 W, Uint16 H, Uint32 Colou ch.BGCol = (Colour & 0x0F0000) >> (16-8); ch.BGCol |= (Colour & 0x000F00) >> (8-4); ch.BGCol |= (Colour & 0x00000F); + ch.FGCol = 0; word = VGA_int_GetWord(&ch); Log("Fill (%i,%i) %ix%i with 0x%x", X, Y, W, H, word);