Remove unused variables/functions and fix misc warnings --- pxlinux/jitterbeta.cpp +++ pxlinux/jitterbeta.cpp @@ -364,15 +364,13 @@ Scsi_Command cmd; - int err; - if (!cmd.associate(drive)) fprintf (stderr,"%s: unable to open: ",drive), perror (NULL), exit (1); for (int i=0;i<16;i++) { - int j = read_one_ecc_block(drive, pBuffer, lba); + read_one_ecc_block(drive, pBuffer, lba); //if (j == COMMAND_FAILED) i=16; lba += 16; } @@ -394,7 +394,7 @@ { int capacity; char *drive; - int** result_map; + int* result_map; int *speed; int interval; @@ -427,7 +426,7 @@ int jitter, k; unsigned int value; int produce_map = 0; - void* pBuffer = malloc(32768); + char* pBuffer[32768]; if (!capacity) read_capacity(drive, &capacity); @@ -445,17 +445,15 @@ // ReleaseSemaphore(hSemaphore, 1, NULL); //} - if (result_map) { - *result_map = (int*)calloc(sizeof(int), capacity+1); - (*result_map)[0] = capacity; + result_map = (int*)calloc(sizeof(int), capacity+1); + result_map[0] = capacity; produce_map = 1; - } for (k = 0;k> 4); capacity >>= 7; - if (result_map) { - *result_map = (int*)calloc(sizeof(int), capacity+1); - (*result_map)[0] = capacity; + result_map = (int*)calloc(sizeof(int), capacity+1); + result_map[0] = capacity; produce_map = 1; - } //if (virtual_file) { // *virtual_file++ = capacity; @@ -442,7 +440,7 @@ for (k = 0;k 4) broken_count++; @@ -472,7 +470,7 @@ //} total_error_count = 0; - for (k=0;k> 4); capacity >>= 7; - if (result_map) { - *result_map = (int*)calloc(sizeof(int), capacity+1); - (*result_map)[0] = capacity; + result_map = (int*)calloc(sizeof(int), capacity+1); + result_map[0] = capacity; produce_map = 1; - } //if (virtual_file) { // *virtual_file++ = capacity; @@ -444,7 +442,7 @@ for (k = 0;k 280) broken_count++; @@ -474,7 +472,7 @@ //} total_error_count = 0; - for (k=0;k 20 && src[k][i] > local_max) { peaks[k][j1] = i; local_max = src[k][i]; @@ -144,13 +143,9 @@ { Scsi_Command cmd; - unsigned char header[40],inq[128],*page2A=NULL; - char cmdname[64]; // int i,j,ntracks,err,dvd_dash=0,dvd_plus=0, // plus_mediaid_printed=0,page2A_printed=0,dvd_ram_spare=0; - unsigned short profile,dvd_0E=0,dvd_10=0,dvd_11=0,dvd_0A=0,dvd_C0=0; //char data [65536]; //= {0x00,0x00,0,0,0,0,0,0}; - char *pDest; int layers; --- pxlinux/transport.hxx +++ pxlinux/transport.hxx @@ -1271,6 +1271,8 @@ #error "Unsupported OS" #endif +#if 0 + #define DUMP_EVENTS 0 static int handle_events (Scsi_Command &cmd) { unsigned char event[8]; @@ -1599,6 +1601,8 @@ } #undef FEATURE21_BROKEN +#endif + #undef ERRCODE #undef CREAM_ON_ERRNO #undef CREAM_ON_ERRNO_NAKED