Skip to content

Commit c1cc246

Browse files
committed
iop: improve code quality (fix llvm warnings)
1 parent 93e5383 commit c1cc246

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

iop/arcade/acata/src/acata-entry.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int acAtaEntry(int argc, char **argv)
3434
{
3535
return ret;
3636
}
37-
if ( !RegisterLibraryEntries(&_exp_acata) == 0 )
37+
if ( RegisterLibraryEntries(&_exp_acata) != 0 )
3838
return -16;
3939
return 0;
4040
}

iop/cdvd/cdvdman/include/cdvdman.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef struct cdvdman_dma3_parameter_
6464
typedef struct cdvdman_internal_struct_
6565
{
6666
char m_cdvdman_command;
67-
char m_last_error;
67+
unsigned char m_last_error;
6868
char m_unused_002;
6969
char m_ncmd_intr_count;
7070
int m_wait_flag;

iop/dev9/atad/src/ps2atad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ int ata_device_sector_io64(int device, void *buf, u64 lba, u32 nsectors, int dir
10301030

10311031
if (atad_devinfo[device].lba48 && (ata_dvrp_workaround ? (lba >= atad_devinfo[device].total_sectors) : 1)) {
10321032
/* Setup for 48-bit LBA. */
1033-
len = (nsectors > 65536) ? 65536 : nsectors;
1033+
len = (u16)((nsectors > 65536) ? 65536 : nsectors); /* 0 means 65536 in LBA48 */
10341034

10351035
/* Combine bits 24-31 and bits 0-7 of lba into sector. */
10361036
sector = ((lba >> 16) & 0xff00) | (lba & 0xff);

iop/fs/filexio/src/fileXio_iop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ static int fileXio_GetDir_RPC(const char* pathname, struct fileXioDirEntry dirEn
386386
}
387387
// wait for any previous DMA to complete
388388
// before over-writing localDirEntry
389-
while(sceSifDmaStat(dmaID)>=0);
389+
while(sceSifDmaStat(dmaID)>=0) {}
390390
DirEntryCopy(&localDirEntry, &dirbuf);
391391
// DMA localDirEntry to the address specified by dirEntry[matched_entries]
392392
// setup the dma struct

iop/fs/http/src/ps2http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int readLine( int socket, char * buffer, int size )
140140

141141
if ( rc <= 0 ) return rc;
142142

143-
if ( (*ptr == '\n') ) break;
143+
if (*ptr == '\n') break;
144144

145145
// increment after check for cr. Don't want to count the cr.
146146
count++;

iop/sound/libsnd2/src/ssclose.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static void _SsClose(s16 seq_sep_no)
2525

2626
score_struct = &_ss_score[sep_no][seq_no];
2727
score_struct->m_flags = 0;
28-
score_struct->m_next_sep = 255;
28+
score_struct->m_next_sep = -1;
2929
score_struct->m_next_seq = 0;
3030
score_struct->m_unk48 = 0;
3131
score_struct->m_unk4A = 0;

iop/sound/libsnd2/src/sstable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void SsSetTableSize(char *table, s16 s_max, s16 t_max)
3838

3939
score_struct = &_ss_score[i][j];
4040
score_struct->m_flags = 0;
41-
score_struct->m_next_sep = 255;
41+
score_struct->m_next_sep = -1;
4242
score_struct->m_next_seq = 0;
4343
score_struct->m_unk48 = 0;
4444
score_struct->m_unk4A = 0;

0 commit comments

Comments
 (0)