Remove declarations of unused variables
All these produced a diagnostic when -Wunused-variables was specified.
This commit is contained in:
parent
948d5954bc
commit
cab439923a
7 changed files with 8 additions and 21 deletions
|
|
@ -92,7 +92,7 @@ int encoder_cleanup(encoder_module_t *enc) {
|
|||
int encoder_read(encoder_module_t *enc) {
|
||||
board_t *board;
|
||||
u32 tsc, count, control;
|
||||
u16 reg_count, reg_time_stamp, ctrl;
|
||||
u16 reg_count, reg_time_stamp;
|
||||
int prev_raw_counts = enc->raw_counts, reg_count_diff, tsc_rollover = 0;
|
||||
int dT_clocks;
|
||||
double dT_seconds;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
extern board_t boards[MAX_BOARDS];
|
||||
extern int boards_count;
|
||||
static u8 page_buffer[PAGE_SIZE];
|
||||
extern u8 boot_block[BOOT_BLOCK_SIZE];
|
||||
static u8 file_buffer[SECTOR_SIZE];
|
||||
|
||||
|
|
@ -339,7 +338,6 @@ static int epp_board_close(board_t *board) {
|
|||
void epp_boards_scan(board_access_t *access) {
|
||||
#ifdef __linux__
|
||||
board_t *board = &boards[boards_count];
|
||||
int r;
|
||||
u16 epp_addr = 0, epp_hi_addr = 0;
|
||||
u32 hm2_cookie, eppio_cookie;
|
||||
|
||||
|
|
|
|||
2
lbp.c
2
lbp.c
|
|
@ -85,7 +85,7 @@ int lbp_read(u16 addr, void *buffer) {
|
|||
}
|
||||
|
||||
int lbp_write(u16 addr, void *buffer) {
|
||||
int send, recv;
|
||||
int send;
|
||||
lbp_cmd_addr_data packet;
|
||||
|
||||
packet.cmd = LBP_CMD_WRITE | LBP_ARGS_32BIT;
|
||||
|
|
|
|||
|
|
@ -179,8 +179,6 @@ int process_cmd_line(int argc, char *argv[]) {
|
|||
break;
|
||||
|
||||
case 'a': {
|
||||
int i;
|
||||
|
||||
if (addr_flag > 0) {
|
||||
printf("Error: multiple --addr options\n");
|
||||
exit(-1);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ int sd;
|
|||
// serial access functions
|
||||
|
||||
int serial_send_packet(void *packet, int size) {
|
||||
int send, rc, ret;
|
||||
int rc, ret;
|
||||
int r = 0, timeouts = 0;
|
||||
struct timespec timeout = {0, 50*1000*1000};
|
||||
struct pollfd fds[1];
|
||||
|
|
@ -66,7 +66,7 @@ int serial_send_packet(void *packet, int size) {
|
|||
}
|
||||
|
||||
int serial_recv_packet(void *packet, int size) {
|
||||
int recv, rc, ret;
|
||||
int rc, ret;
|
||||
int r = 0, timeouts = 0;
|
||||
struct timespec timeout = {0, 300*1000*1000};
|
||||
struct pollfd fds[1];
|
||||
|
|
@ -165,7 +165,7 @@ void serial_boards_cleanup(board_access_t *access) {
|
|||
|
||||
void serial_boards_scan(board_access_t *access) {
|
||||
lbp16_cmd_addr packet;
|
||||
int send = 0, recv = 0, ret = 0;
|
||||
int send = 0, recv = 0;
|
||||
char buff[16];
|
||||
|
||||
LBP16_INIT_PACKET4(packet, CMD_READ_BOARD_INFO_ADDR16_INCR(8), 0);
|
||||
|
|
@ -207,12 +207,9 @@ void serial_boards_scan(board_access_t *access) {
|
|||
void serial_print_info(board_t *board) {
|
||||
lbp16_cmd_addr packet;
|
||||
int i, j, recv;
|
||||
u32 flash_id;
|
||||
char *mem_types[16] = {NULL, "registers", "memory", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "EEPROM", "flash"};
|
||||
char *mem_writeable[2] = {"RO", "RW"};
|
||||
char *acc_types[4] = {"8-bit", "16-bit", "32-bit", "64-bit"};
|
||||
char *led_debug_types[2] = {"Hostmot2", "eth debug"};
|
||||
char *boot_jumpers_types[4] = {"fixed "LBP16_HW_IP, "fixed from EEPROM", "from BOOTP", "INVALID"};
|
||||
lbp_mem_info_area mem_area;
|
||||
lbp_timers_area timers_area;
|
||||
lbp_status_area stat_area;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static void enable_sserial_pins(llio_t *llio) {
|
|||
|
||||
// Return the physical ports to default
|
||||
static void disable_sserial_pins(llio_t *llio) {
|
||||
int port_pin, port;
|
||||
int port;
|
||||
u32 ddr_reg = 0;
|
||||
u32 src_reg = 0;
|
||||
hm2_module_desc_t *md = hm2_find_module(&(llio->hm2), HM2_GTAG_IOPORT);
|
||||
|
|
@ -95,7 +95,6 @@ void sslbp_send_remote_cmd(sserial_module_t *ssmod, int interface, int channel,
|
|||
}
|
||||
|
||||
u8 sslbp_read_local8(sserial_module_t *ssmod, int interface, u32 addr) {
|
||||
u8 ret;
|
||||
|
||||
sslbp_send_local_cmd(ssmod, interface, SSLBP_CMD_READ(addr));
|
||||
sslbp_wait_complete(ssmod, interface);
|
||||
|
|
@ -222,9 +221,7 @@ void sslbp_read_remote_bytes(sserial_module_t *ssmod, int interface, int channel
|
|||
}
|
||||
|
||||
int sserial_init(sserial_module_t *ssmod, board_t *board, int interface_num, int channel_num, u32 remote_type) {
|
||||
u32 cmd, status, data, addr;
|
||||
u16 d;
|
||||
int i;
|
||||
u32 cmd, status;
|
||||
hm2_module_desc_t *md = hm2_find_module(&(board->llio.hm2), HM2_GTAG_SSERIAL);
|
||||
|
||||
if (md == NULL) {
|
||||
|
|
@ -338,7 +335,6 @@ void sserial_module_init(llio_t *llio) {
|
|||
hm2_module_desc_t *md = hm2_find_module(&(llio->hm2), HM2_GTAG_SSERIAL);
|
||||
sserial_module_t ssmodule, *ssmod = &ssmodule;
|
||||
char *record_types[9] = {"PADDING", "BITFIELD", "UNSIGNED", "SIGNED", "NV UNSIGNED", "NV SIGNED", "STREAM", "BOOLEAN", "ENCODER"};
|
||||
char *mode_types[2] = {"HARDWARE", "SOFTWARE"};
|
||||
char *baud_rates[12] = {"9600b", "19200b", "38400b", "57600b", "115200b", "230400b", "460800b", "921600b", "1.25Mb", "2.5Mb", "5Mb", "10Mb"};
|
||||
|
||||
if (md == NULL)
|
||||
|
|
@ -419,7 +415,7 @@ void sserial_module_init(llio_t *llio) {
|
|||
sserial_pdd_t sserial_pdd;
|
||||
sserial_md_t sserial_md;
|
||||
u8 record_type;
|
||||
char name[48], unit[48], buff[32];
|
||||
char name[48], unit[48];
|
||||
|
||||
d = sslbp_read_remote16(ssmod, port, channel, addr);
|
||||
if (d == 0) break;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ int usb_write(llio_t *self, u32 addr, void *buffer, int size) {
|
|||
static int usb_program_fpga(llio_t *self, char *bitfile_name) {
|
||||
board_t *board = self->board;
|
||||
int bindex, bytesread;
|
||||
u32 status, control;
|
||||
char part_name[32];
|
||||
struct stat file_stat;
|
||||
FILE *fp;
|
||||
|
|
@ -124,7 +123,6 @@ void usb_boards_scan(board_access_t *access) {
|
|||
board_t *board = &boards[boards_count];
|
||||
u8 cmd, data;
|
||||
char dev_name[4];
|
||||
u32 cookie;
|
||||
|
||||
board_init_struct(board);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue