Fix 10 more warnings in the code
This commit is contained in:
@@ -276,7 +276,7 @@ int json_parse(pcjs_t *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Read and null terminate */
|
/* Read and null terminate */
|
||||||
fread(buffer, sizeof(char), numbytes, dev->fp);
|
(void) !fread(buffer, sizeof(char), numbytes, dev->fp);
|
||||||
buffer[numbytes] = '\0';
|
buffer[numbytes] = '\0';
|
||||||
|
|
||||||
cJSON *parsed_json = cJSON_Parse(buffer);
|
cJSON *parsed_json = cJSON_Parse(buffer);
|
||||||
@@ -305,7 +305,6 @@ int json_parse(pcjs_t *dev)
|
|||||||
|
|
||||||
const cJSON *each_track = NULL;
|
const cJSON *each_track = NULL;
|
||||||
int total_c = 0;
|
int total_c = 0;
|
||||||
int full_count = 0;
|
|
||||||
|
|
||||||
/* The diskData array is essentially [c][h][s] */
|
/* The diskData array is essentially [c][h][s] */
|
||||||
/* Start with the tracks in [c] */
|
/* Start with the tracks in [c] */
|
||||||
@@ -422,7 +421,6 @@ int json_parse(pcjs_t *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
total_sectors++;
|
total_sectors++;
|
||||||
full_count++;
|
|
||||||
dev->calc_total_sectors = total_sectors;
|
dev->calc_total_sectors = total_sectors;
|
||||||
/* End sectors */
|
/* End sectors */
|
||||||
}
|
}
|
||||||
|
@@ -167,8 +167,6 @@ plat_cdrom_get_audio_track_info(UNUSED(int end), int track, int *track_num, TMSF
|
|||||||
int
|
int
|
||||||
plat_cdrom_get_audio_sub(UNUSED(uint32_t sector), uint8_t *attr, uint8_t *track, uint8_t *index, TMSF *rel_pos, TMSF *abs_pos)
|
plat_cdrom_get_audio_sub(UNUSED(uint32_t sector), uint8_t *attr, uint8_t *track, uint8_t *index, TMSF *rel_pos, TMSF *abs_pos)
|
||||||
{
|
{
|
||||||
long size = 0;
|
|
||||||
|
|
||||||
*track = 1;
|
*track = 1;
|
||||||
*attr = 0x14;
|
*attr = 0x14;
|
||||||
*index = 1;
|
*index = 1;
|
||||||
@@ -197,10 +195,6 @@ plat_cdrom_get_sector_size(UNUSED(uint32_t sector))
|
|||||||
int
|
int
|
||||||
plat_cdrom_read_sector(uint8_t *buffer, int raw, uint32_t sector)
|
plat_cdrom_read_sector(uint8_t *buffer, int raw, uint32_t sector)
|
||||||
{
|
{
|
||||||
int status;
|
|
||||||
long size = 0;
|
|
||||||
int buflen = raw ? RAW_SECTOR_SIZE : COOKED_SECTOR_SIZE;
|
|
||||||
|
|
||||||
plat_cdrom_open();
|
plat_cdrom_open();
|
||||||
|
|
||||||
if (raw) {
|
if (raw) {
|
||||||
|
@@ -167,8 +167,6 @@ plat_cdrom_get_audio_track_info(UNUSED(int end), int track, int *track_num, TMSF
|
|||||||
int
|
int
|
||||||
plat_cdrom_get_audio_sub(UNUSED(uint32_t sector), uint8_t *attr, uint8_t *track, uint8_t *index, TMSF *rel_pos, TMSF *abs_pos)
|
plat_cdrom_get_audio_sub(UNUSED(uint32_t sector), uint8_t *attr, uint8_t *track, uint8_t *index, TMSF *rel_pos, TMSF *abs_pos)
|
||||||
{
|
{
|
||||||
long size = 0;
|
|
||||||
|
|
||||||
*track = 1;
|
*track = 1;
|
||||||
*attr = 0x14;
|
*attr = 0x14;
|
||||||
*index = 1;
|
*index = 1;
|
||||||
@@ -197,10 +195,6 @@ plat_cdrom_get_sector_size(UNUSED(uint32_t sector))
|
|||||||
int
|
int
|
||||||
plat_cdrom_read_sector(uint8_t *buffer, int raw, uint32_t sector)
|
plat_cdrom_read_sector(uint8_t *buffer, int raw, uint32_t sector)
|
||||||
{
|
{
|
||||||
int status;
|
|
||||||
long size = 0;
|
|
||||||
int buflen = raw ? RAW_SECTOR_SIZE : COOKED_SECTOR_SIZE;
|
|
||||||
|
|
||||||
plat_cdrom_open();
|
plat_cdrom_open();
|
||||||
|
|
||||||
if (raw) {
|
if (raw) {
|
||||||
|
Reference in New Issue
Block a user