Kernel - Silencing complaining compilers
authorJohn Hodge <[email protected]>
Sat, 14 Jul 2012 12:33:05 +0000 (20:33 +0800)
committerJohn Hodge <[email protected]>
Sat, 14 Jul 2012 12:33:05 +0000 (20:33 +0800)
KernelLand/Kernel/vfs/mount.c
KernelLand/Modules/IPStack/adapters.c

index 5ac67a5..1832ac1 100644 (file)
@@ -63,7 +63,7 @@ int VFS_Mount(const char *Device, const char *MountPoint, const char *Filesystem
                }
                
                tVFS_Driver     *bestfs = NULL;
-                int    bestrank, rank;
+                int    bestrank = 0, rank;
                for( fs = gVFS_Drivers; fs; fs = fs->Next )
                {
                        if(!fs->Detect) continue ;
index 83741df..90c0b24 100644 (file)
@@ -370,13 +370,13 @@ void IPStack_SendDebugText(const char *Text)
        memcpy(buffer, pkt_hdr, sizeof(pkt_hdr));
        memcpy(buffer + sizeof(pkt_hdr), cache, cache_len);
        
-       *(Uint16*)&buffer[14+2] = BigEndian16( sizeof(pkt_hdr)-14 + cache_len );        // IP Size
-       *(Uint16*)&buffer[14+10] = BigEndian16( 0 );    // IP Header
-       *(Uint16*)&buffer[14+20+4] = BigEndian16( 8+cache_len );        // UDP Size
-       *(Uint16*)&buffer[14+20+6] = BigEndian16( 0 );  // UDP Checksum
-       *(Uint32*)&buffer[link_checksum_ofs] = BigEndian32( 0 );        // 802.3 checksum?
+       ((Uint16*)buffer)[(14+2)/2] = BigEndian16( sizeof(pkt_hdr)-14 + cache_len );    // IP Size
+       ((Uint16*)buffer)[(14+10)/2] = BigEndian16( 0 );        // IP Header
+       ((Uint16*)buffer)[(14+20+4)/2] = BigEndian16( 8+cache_len );    // UDP Size
+       ((Uint16*)buffer)[(14+20+6)/2] = BigEndian16( 0 );      // UDP Checksum
+//     *(Uint32*)&buffer[link_checksum_ofs] = BigEndian32( 0 );        // 802.3 checksum?
        // TODO: Calculate checksums
-       *(Uint16*)&buffer[14+10] = BigEndian16( IPv4_Checksum(buffer+14,20) );  // IP Header
+       ((Uint16*)buffer)[(14+10)/2] = BigEndian16( IPv4_Checksum(buffer+14,20) );      // IP Header
        
        // Create buffer
        tIPStackBuffer  *buf = IPStack_Buffer_CreateBuffer(1);

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