Kernel - Fixing small errors exposed by new compiler
authorJohn Hodge <[email protected]>
Thu, 12 Jul 2012 08:54:26 +0000 (16:54 +0800)
committerJohn Hodge <[email protected]>
Thu, 12 Jul 2012 08:54:26 +0000 (16:54 +0800)
KernelLand/Modules/IPStack/ipv6.c
KernelLand/Modules/IPStack/link.c
KernelLand/Modules/USB/Core/usb_lowlevel.c
KernelLand/Modules/x86/VGAText/vga.c

index 7cb8e0a..090e4c0 100644 (file)
@@ -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 {
index 3dcd294..c4f716f 100644 (file)
@@ -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;
index 6b38e65..dce7c33 100644 (file)
@@ -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
index cc8fda3..d7ab474 100644 (file)
@@ -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);

UCC git Repository :: git.ucc.asn.au