Skip to content

Commit

Permalink
[nasa/nos3#303] - Fix compiler warnings and errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
msuder committed May 13, 2024
1 parent 7f4fc71 commit cf82b54
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion fsw/src/gpio_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
void gpio_dummy()
{
gpio_info_t device;
int32_t status = gpio_init(&device);
gpio_init(&device);
}
2 changes: 0 additions & 2 deletions fsw/src/hwlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ [email protected]
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 hwlib_Init(void)
{
int32 status = OS_SUCCESS;

/*
** Register the events
*/
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/mem_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
void mem_dummy()
{
uint8_t tmp;
int32_t status = devmem_read(0,&tmp, 1);
devmem_read(0,&tmp, 1);
}
2 changes: 1 addition & 1 deletion fsw/src/socket_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
void socket_dummy()
{
socket_info_t device;
int32_t status = socket_create(&device);
socket_create(&device);
}
2 changes: 1 addition & 1 deletion fsw/src/torquer_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
void trq_dummy()
{
trq_info_t device;
int32_t status = trq_init(&device);
trq_init(&device);
}
2 changes: 1 addition & 1 deletion sim/src/libcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ int32_t can_read(can_info_t* device)
int32_t can_master_transaction(can_info_t* device)
{
int result = CAN_ERROR;
int i;

/* get can device handle */
NE_CanHandle *dev = nos_get_can_device(device);
Expand All @@ -118,6 +117,7 @@ int32_t can_master_transaction(can_info_t* device)
}

#ifdef LIBCAN_VERBOSE
int i;
OS_printf("can_master_transaction: \n");
OS_printf(" can_id = 0x%08x \t tx: 0x", device->tx_frame.can_id);
for (i = 0; i < device->tx_frame.can_dlc; i++)
Expand Down
4 changes: 0 additions & 4 deletions sim/src/libsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ int32_t socket_accept(socket_info_t* socket_info)
int ret;
struct sockaddr_in client;
int32_t status;
int ip_str_len;

status = SOCKET_SUCCESS;

Expand Down Expand Up @@ -305,9 +304,7 @@ int32_t socket_send(socket_info_t* socket_info, uint8_t* buffer, size_t buflen,
{
int ret;
int32_t status;
int address_family;
struct sockaddr_in remote_sockaddr;
unsigned int i;
status = SOCKET_SUCCESS;

switch(socket_info->type)
Expand Down Expand Up @@ -381,7 +378,6 @@ int32_t socket_recv(socket_info_t* socket_info, uint8_t* buffer, size_t buflen,
{
int c;
int ret;
int ip_str_len;
int32_t status;
struct sockaddr_in remote_sockaddr;

Expand Down
1 change: 0 additions & 1 deletion sim/src/libspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ void nos_destroy_spi_link(void)
int32_t spi_init_dev(spi_info_t* device)
{
int status = SPI_SUCCESS;
char buffer[16];


pthread_mutex_lock(&spi_bus_mutex[device->bus]);
Expand Down

0 comments on commit cf82b54

Please sign in to comment.