Skip to content

Commit

Permalink
fix: [loadfile] fix instances of -Wunused-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
uyjulian committed Mar 23, 2024
1 parent 47d6601 commit 592cb9e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions iop/system/loadfile/src/eeelfloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ static int *allocate_heap_buffer(unsigned int lower_bound, unsigned int upper_bo
{
unsigned int upper_bound_rounded;

(void)lower_bound;

upper_bound_rounded = upper_bound;
// Align to 4 bytes
if ( (upper_bound_rounded & 3) != 0 )
Expand Down Expand Up @@ -306,6 +308,8 @@ static int fileio_reader_function(int fd, loadfile_allocate_handler_struct_t *al
loadfile_ee_elf_ringbuffer_content_t *rbc;
int read_res;

(void)userdata;

read_buffer_offset = allocate_info->read_buffer_offset;
rbc = &allocate_info->ring_buffer_contents[allocate_info->ring_buffer_index];
rbc->buffer_offset = read_buffer_offset;
Expand Down Expand Up @@ -415,6 +419,8 @@ static int elf_load_single_section(
SifDmaTransfer_t dmat;
int state;

(void)epc;

shdr = NULL;
if ( read(flhs->fd, &flhs->elf_header, 0x34) != 0x34 )
{
Expand Down
17 changes: 17 additions & 0 deletions iop/system/loadfile/src/loadfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ int _start(int argc, char *argv[])
int thid;
iop_thread_t thparam;

(void)argc;
(void)argv;

FlushDcache();
BootMode_3 = QueryBootMode(3);
if ( BootMode_3 )
Expand Down Expand Up @@ -63,6 +66,8 @@ static int *loadfile_modload(const struct _lf_module_load_arg *in_packet, int le
{
const char *path;

(void)length;

path = in_packet->path;
if ( IsIllegalBootDevice(path) )
{
Expand All @@ -83,6 +88,8 @@ static int *loadfile_elfload(const struct _lf_elf_load_arg *in_packet, int lengt
int result_out;
int result_module_out;

(void)length;

path = in_packet->path;
if ( IsIllegalBootDevice(path) )
{
Expand Down Expand Up @@ -113,6 +120,8 @@ static int *loadfile_setaddr(const struct _lf_iop_val_arg *in_packet, int length
void *iop_addr;
int type;

(void)length;

iop_addr = (void *)in_packet->p.iop_addr;
type = in_packet->type;
printf("set val add %p type %x ", iop_addr, type);
Expand All @@ -139,6 +148,8 @@ static int *loadfile_getaddr(const struct _lf_iop_val_arg *in_packet, int length
void *iop_addr;
int type;

(void)length;

iop_addr = (void *)in_packet->p.iop_addr;
type = in_packet->type;
printf("get val add %p type %x ", iop_addr, type);
Expand All @@ -162,6 +173,8 @@ static int *loadfile_getaddr(const struct _lf_iop_val_arg *in_packet, int length

static int *loadfile_mg_modload(const struct _lf_module_load_arg *in_packet, int length, int *outbuffer)
{
(void)length;

outbuffer[0] = LoadStartKelfModule(in_packet->path, in_packet->p.arg_len, in_packet->args, &outbuffer[1]);
return outbuffer;
}
Expand All @@ -171,6 +184,8 @@ static int *loadfile_mg_elfload(const struct _lf_elf_load_arg *in_packet, int le
int result_out;
int result_module_out;

(void)length;

outbuffer[0] =
loadfile_mg_elfload_proc(in_packet->path, in_packet->epc, in_packet->secname, &result_out, &result_module_out);
if ( outbuffer[0] >= 0 )
Expand All @@ -191,6 +206,8 @@ static int *loadfile_loadmodulebuffer(const struct _lf_module_buffer_load_arg *i
{
int ModuleBuffer;

(void)length;

printf("loadbuffer: addrres %x args %d arg %s\n", in_packet->p.result, in_packet->q.arg_len, in_packet->args);
ModuleBuffer = LoadModuleBuffer(in_packet->p.ptr);
if ( ModuleBuffer >= 0 )
Expand Down

0 comments on commit 592cb9e

Please sign in to comment.