--- FiFo.c.old 2006-05-02 22:31:47.000000000 +0200 +++ FiFo.c 2006-05-02 22:39:29.000000000 +0200 @@ -61,6 +61,7 @@ void fifo_get3(struct fifo *fifo, void *value, u32 size, int type){ struct item * p; register u32 q; + u8* u8Value; if ( value == NULL ) return; if(fifo->first->next == NULL) memset(value, 0, size); @@ -72,7 +73,8 @@ q = min(p->size - fifo->used, size); memcpy(value,(u8*)p->data + fifo->used, q); size -= q; - (u8*)value += q; + u8Value = (u8*)value + q; + value = u8Value; if(type) { fifo->count -= q; @@ -94,6 +96,7 @@ void fifo_get(struct fifo *fifo, void *value, u32 size){ struct item *p; register u32 q; + u8* u8Value; if (value==NULL) return; @@ -107,7 +110,8 @@ fifo->used+=q; fifo->count-=q; size-=q; - (u8*)value+=q; + u8Value = (u8*)value + q; + value = u8Value; if (fifo->used>=p->size){ fifo->used=0; fifo->first->next=p->next; @@ -124,6 +128,7 @@ void fifo_get2(struct fifo *fifo, void *value, u32 size){ struct item *p; register u32 q; + u8* u8Value; if (value==NULL) return; @@ -135,7 +140,8 @@ q=min(p->size-fifo->used, size); memcpy(value, (u8*)p->data+fifo->used, q); size-=q; - (u8*)value+=q; + u8Value = (u8*)value + q; + value = u8Value; p=fifo->first->next; } memset(value, 0, size); --- CDVDiso.c.old 2006-05-02 22:44:47.000000000 +0200 +++ CDVDiso.c 2006-05-02 23:29:19.000000000 +0200 @@ -198,7 +198,7 @@ // case CdSecS2064: ((u32*)buf)[0] = i + 0x30000; memcpy((u8*)buf+12, buff, 2048); - (u8*)buf+= 2064; break; + buf+= 2064; break; // default: // return 0; // } @@ -300,14 +300,13 @@ //CdSync(0x00); // point the tocEntryPointer at the first real toc entry - (char*)tocEntryPointer = toc; + tocEntryPointer = (struct dirTocEntry *)toc; num_dir_sectors = (tocEntryPointer->fileSize+2047) >> 11; //round up fix current_sector = tocEntryPointer->fileLBA; - (char*)tocEntryPointer += tocEntryPointer->length; - (char*)tocEntryPointer += tocEntryPointer->length; - + tocEntryPointer = (struct dirTocEntry *)((char *)tocEntryPointer + tocEntryPointer->length); + tocEntryPointer = (struct dirTocEntry *)((char *)tocEntryPointer + tocEntryPointer->length); localTocEntry.fileLBA = CDVolDesc.rootToc.tocLBA; // while (there are more dir names in the path) @@ -360,7 +359,7 @@ } // CdSync(0x00); - (char*)tocEntryPointer = toc; + tocEntryPointer = (struct dirTocEntry *)toc; } else { @@ -385,7 +384,7 @@ } // point to the next entry - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); } // If we havent found the directory name we wanted then fail @@ -410,23 +409,23 @@ current_sector = localTocEntry.fileLBA; // and point the tocEntryPointer at the first real toc entry - (char*)tocEntryPointer = toc; - (char*)tocEntryPointer += tocEntryPointer->length; - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *)toc; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); } #ifdef DEBUG printf("CDVD_findfile: found dir, now looking for file\n"); #endif - (char*)tocEntryPointer = toc; + tocEntryPointer = (struct dirTocEntry *)toc; num_dir_sectors = (tocEntryPointer->fileSize+2047) >> 11; //round up fix dir_lba = tocEntryPointer->fileLBA; - (char*)tocEntryPointer = toc; - (char*)tocEntryPointer += tocEntryPointer->length; - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *)toc; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); while (num_dir_sectors > 0) { @@ -455,7 +454,7 @@ return TRUE; } - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); } num_dir_sectors--; @@ -470,7 +469,7 @@ } // CdSync(0x00); - (char*)tocEntryPointer = toc; + tocEntryPointer = (struct dirTocEntry *) toc; } } @@ -521,13 +520,13 @@ //CdSync(0x00); // point the tocEntryPointer at the first real toc entry - (char*)tocEntryPointer = toc; + tocEntryPointer = (struct dirTocEntry *)toc; num_dir_sectors = (tocEntryPointer->fileSize+2047) >> 11; current_sector = tocEntryPointer->fileLBA; - (char*)tocEntryPointer += tocEntryPointer->length; - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); // use strtok to get the next dir name @@ -563,7 +562,7 @@ } //CdSync(0x00); - (char*)tocEntryPointer = toc; + tocEntryPointer = (struct dirTocEntry *)toc; } else{ // Couldnt find the directory, and got to end of directory @@ -588,7 +587,7 @@ } // point to the next entry - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); } // If we havent found the directory name we wanted then fail @@ -611,9 +610,9 @@ current_sector = localTocEntry.fileLBA; // and point the tocEntryPointer at the first real toc entry - (char*)tocEntryPointer = toc; - (char*)tocEntryPointer += tocEntryPointer->length; - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *)toc; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); } // We know how much data we need to read in from the DirTocHeader @@ -625,7 +624,7 @@ // This is a bit of a waste of reads since we're not actually copying the data out yet, // but we dont know how big this TOC might be, so we cant allocate a specific size - (char*)tocEntryPointer = toc; + tocEntryPointer = (struct dirTocEntry *)toc; // Need to STORE the start LBA and number of Sectors, for use by the retrieve func. getDirTocData.start_LBA = localTocEntry.fileLBA; @@ -637,9 +636,9 @@ num_dir_sectors = getDirTocData.num_sectors; - (char*)tocEntryPointer = toc; - (char*)tocEntryPointer += tocEntryPointer->length; - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *)toc; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); toc_entry_num=0; @@ -661,7 +660,7 @@ } //CdSync(0x00); - (char*)tocEntryPointer = toc; + tocEntryPointer = (struct dirTocEntry *)toc; // continue; } @@ -694,7 +693,7 @@ } } - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); } @@ -731,14 +730,14 @@ if (getDirTocData.current_entry == 0){ // if this is the first read then make sure we point to the first real entry - (char*)tocEntryPointer = toc; - (char*)tocEntryPointer += tocEntryPointer->length; - (char*)tocEntryPointer += tocEntryPointer->length; + tocEntryPointer = (struct dirTocEntry *)toc; + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); + tocEntryPointer = (struct dirTocEntry *) ((char *)tocEntryPointer + tocEntryPointer->length); getDirTocData.current_sector_offset = (char*)tocEntryPointer - toc; } else{ - (char*)tocEntryPointer = toc + getDirTocData.current_sector_offset; + tocEntryPointer = (struct dirTocEntry *)(toc + getDirTocData.current_sector_offset); } if (req_entries > 128) @@ -763,7 +762,7 @@ //CdSync(0x00); getDirTocData.current_sector_offset = 0; - (char*)tocEntryPointer = toc + getDirTocData.current_sector_offset; + tocEntryPointer = (struct dirTocEntry *)(toc + getDirTocData.current_sector_offset); // continue; } @@ -789,7 +788,7 @@ } getDirTocData.current_sector_offset += tocEntryPointer->length; - (char*)tocEntryPointer = toc + getDirTocData.current_sector_offset; + tocEntryPointer = (struct dirTocEntry *)(toc + getDirTocData.current_sector_offset); } else{ if (strlen(getDirTocData.extension_list) > 0){ @@ -799,13 +798,13 @@ } getDirTocData.current_sector_offset += tocEntryPointer->length; - (char*)tocEntryPointer = toc + getDirTocData.current_sector_offset; + tocEntryPointer = (struct dirTocEntry *)(toc + getDirTocData.current_sector_offset); } else{ toc_entry_num++; getDirTocData.current_sector_offset += tocEntryPointer->length; - (char*)tocEntryPointer = toc + getDirTocData.current_sector_offset; + tocEntryPointer = (struct dirTocEntry *)(toc + getDirTocData.current_sector_offset); } } /*