From 212b865479871ce00b631bfe66ebda0bc6d6a62b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 18 Feb 2009 01:24:27 +0000 Subject: [PATCH] remove spurious semicolons at the end of braces git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1438 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 7 +++++++ jtag/src/bsdl2jtag.c | 4 ++-- jtag/src/bus/mpc824x.c | 6 +++--- jtag/src/cmd/include.c | 2 +- jtag/src/cmd/scan.c | 2 +- jtag/src/cmd/shell.c | 4 ++-- jtag/src/jim/intel_28f800b3.c | 6 +++--- jtag/src/jim/some_cpu.c | 6 +++--- jtag/src/jim/tap.c | 10 +++++----- jtag/src/part/data_register.c | 2 +- jtag/src/tap/cable.c | 14 +++++++------- jtag/src/tap/cable/generic.c | 22 +++++++++++----------- jtag/src/tap/cable/jim.c | 2 +- jtag/src/tap/cable/jlink.c | 6 +++--- jtag/src/tap/cable/xpc.c | 12 ++++++------ jtag/src/tap/usbconn/libusb.c | 2 +- 16 files changed, 57 insertions(+), 50 deletions(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index f4a20796..bfa55fb2 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -3,6 +3,13 @@ * src/bus/mpc824x.c (setup_address): Return on unhandled sizes to avoid compiler warnings. + * src/bsdl2jtag.c, src/bus/mpc824x.c, src/cmd/include.c, src/cmd/scan.c, + src/cmd/shell.c, src/jim/intel_28f800b3.c, src/jim/some_cpu.c, + src/jim/tap.c, src/part/data_register.c, src/tap/cable.c, + src/tap/cable/generic.c, src/tap/cable/jim.c, src/tap/cable/jlink.c, + src/tap/cable/xpc.c, src/tap/usbconn/libusb.c: Remove spurious semicolons + from places they do not belong (like at the end of braces). + 2009-02-16 Arnim Laeuger * doc/UrJTAG.txt: some FAQs diff --git a/jtag/src/bsdl2jtag.c b/jtag/src/bsdl2jtag.c index 14d621d2..6a52a70c 100644 --- a/jtag/src/bsdl2jtag.c +++ b/jtag/src/bsdl2jtag.c @@ -241,7 +241,7 @@ int endline(void) { break; case 7: j=0; - for(i=0;i> ( (i*8+j)) ) & 1); printf(" "); - }; + } printf("\n"); } @@ -418,7 +418,7 @@ get_data( bus_t *bus, uint32_t adr ) else printf("%1d", (d >> ( (i*8+j)) ) & 1); printf(" "); - }; + } printf("\n"); } diff --git a/jtag/src/cmd/include.c b/jtag/src/cmd/include.c index 704cd430..74800db5 100644 --- a/jtag/src/cmd/include.c +++ b/jtag/src/cmd/include.c @@ -89,7 +89,7 @@ cmd_include_or_script_run( chain_t *chain, int is_include, char *params[] ) if (cmd_params( params ) > 2) { sscanf(params[2],"%d",&j); /* loop n times option */ - }; + } for(i = 0; i < j ;i++) { go = jtag_parse_file( chain, path ); diff --git a/jtag/src/cmd/scan.c b/jtag/src/cmd/scan.c index 21f0d4e0..4bf67e69 100644 --- a/jtag/src/cmd/scan.c +++ b/jtag/src/cmd/scan.c @@ -77,7 +77,7 @@ cmd_scan_run( chain_t *chain, char *params[] ) { printf( _("%s(%s:%d) Part can't SAMPLE\n"), __FUNCTION__, __FILE__, __LINE__ ); return 1; - }; + } chain_shift_instructions( chain ); diff --git a/jtag/src/cmd/shell.c b/jtag/src/cmd/shell.c index bfdad132..4460c163 100644 --- a/jtag/src/cmd/shell.c +++ b/jtag/src/cmd/shell.c @@ -61,14 +61,14 @@ cmd_shell_run( chain_t *chain, char *params[] ) { printf( _("Out of memory\n") ); return -1; - }; + } strcpy(shell_cmd, params[1]); for(i=2; istatus_buffer = is->status; /* latch status */ - }; + } if(((control&7)==6)&&((is->control_buffer&2)!=2)) /* WE rise, CS active: WRITE */ { @@ -327,7 +327,7 @@ void intel_28fxxxb3_update(jim_bus_device_t *d, { is->opstate = ERASE_SUSP_TO_READ_STATUS; is->status |= I28F_ERASE_SUSPENDED; - }; + } break; case ERASE_SUSP_TO_READ_STATUS: @@ -357,7 +357,7 @@ void intel_28fxxxb3_update(jim_bus_device_t *d, } break; } - }; + } is->control_buffer = control; } } diff --git a/jtag/src/jim/some_cpu.c b/jtag/src/jim/some_cpu.c index 6cc53b46..99c9ef95 100644 --- a/jtag/src/jim/some_cpu.c +++ b/jtag/src/jim/some_cpu.c @@ -96,7 +96,7 @@ void some_cpu_tck_rise(jim_device_t *dev, /* Store data into data "input" cells in BSR */ dev->sreg[2].reg[2] = d; - }; + } break; case UPDATE_IR: @@ -174,7 +174,7 @@ void some_cpu_tck_fall(jim_device_t *dev, } } } - }; + } break; default: @@ -231,7 +231,7 @@ jim_device_t *some_cpu(void) if(*b == NULL) break; memcpy(*b, some_cpu_attached[i].part, sizeof(jim_bus_device_t)); (*b)->init(*b); - }; + } if(some_cpu_attached[i].part) /* loop broken; failed to malloc all parts */ { diff --git a/jtag/src/jim/tap.c b/jtag/src/jim/tap.c index 236abe5d..aedf3e0a 100644 --- a/jtag/src/jim/tap.c +++ b/jtag/src/jim/tap.c @@ -71,7 +71,7 @@ void jim_print_tap_state(char *rof, jim_device_t *dev) case 5: printf("PAUSE"); break; case 6: printf("EXIT2"); break; default: printf("UPDATE"); break; - }; + } if(dev->tap_state & 7) { if(dev->tap_state & 8) @@ -86,8 +86,8 @@ void jim_print_tap_state(char *rof, jim_device_t *dev) printf("(%d)=", dev->current_dr); jim_print_sreg(&dev->sreg[dev->current_dr]); } - }; - }; + } + } printf("\n"); } @@ -161,7 +161,7 @@ void jim_tck_rise(jim_state_t *s, int tms, int tdi) { reg[i] >>= 1; if(reg[i+1] & 1) reg[i] |= 0x80000000; - }; + } /* End with MSW at index i */ @@ -256,7 +256,7 @@ jim_state_t *jim_init(void) { printf("Out of memory!\n"); return NULL; - }; + } s->shmem_size = (1<<20)*16; /* 16 MByte */ s->shmem = malloc(s->shmem_size); diff --git a/jtag/src/part/data_register.c b/jtag/src/part/data_register.c index 3b968f9d..d7159c56 100644 --- a/jtag/src/part/data_register.c +++ b/jtag/src/part/data_register.c @@ -56,7 +56,7 @@ data_register_alloc( const char *name, int len ) { dr->in = register_alloc( 1 ); dr->out = register_alloc( 1 ); - }; + } if (!dr->in || !dr->out) { free( dr->in ); free( dr->out ); diff --git a/jtag/src/tap/cable.c b/jtag/src/tap/cable.c index 9baffbbb..23a83a5d 100644 --- a/jtag/src/tap/cable.c +++ b/jtag/src/tap/cable.c @@ -174,7 +174,7 @@ cable_init( cable_t *cable ) if(cable->todo.data != NULL) free(cable->todo.data); if(cable->done.data != NULL) free(cable->done.data); return 1; - }; + } return cable->driver->init( cable ); } @@ -356,7 +356,7 @@ cable_purge_queue( cable_queue_info_t *q, int io ) i++; if(i >= q->max_items) i = 0; q->num_items--; - }; + } q->num_items = 0; q->next_item = 0; @@ -408,7 +408,7 @@ cable_get_tdo_late( cable_t *cable ) { return cable->done.data[i].arg.value.val; } - }; + } return cable->driver->get_tdo( cable ); } @@ -472,7 +472,7 @@ cable_get_signal_late( cable_t *cable, pod_sigsel_t sig ) { return cable->done.data[i].arg.value.val; } - }; + } return cable->driver->get_signal( cable, sig ); } @@ -514,7 +514,7 @@ cable_transfer_late( cable_t *cable, char *out ) cable->done.data[i].arg.xferred.len); free(cable->done.data[i].arg.xferred.out); return cable->done.data[i].arg.xferred.res; - }; + } if(cable->done.data[i].action != CABLE_TRANSFER) { @@ -546,7 +546,7 @@ cable_defer_transfer( cable_t *cable, int len, char *in, char *out ) free(ibuf); return 1; } - }; + } i = cable_add_queue_item( cable, &(cable->todo) ); if( i < 0 ) @@ -554,7 +554,7 @@ cable_defer_transfer( cable_t *cable, int len, char *in, char *out ) free(ibuf); if(obuf) free(obuf); return 1; /* report failure */ - }; + } cable->todo.data[i].action = CABLE_TRANSFER; cable->todo.data[i].arg.transfer.len = len; diff --git a/jtag/src/tap/cable/generic.c b/jtag/src/tap/cable/generic.c index fa80aacb..235a61bf 100644 --- a/jtag/src/tap/cable/generic.c +++ b/jtag/src/tap/cable/generic.c @@ -110,7 +110,7 @@ do_one_queued_action( cable_t *cable ) printf(_("No space in cable activity results queue.\n")); cable_purge_queue( &(cable->done), 1 ); } - }; + } switch(cable->todo.data[i].action) { @@ -143,9 +143,9 @@ do_one_queued_action( cable_t *cable ) cable->done.data[j].arg.xferred.len = cable->todo.data[i].arg.transfer.len; cable->done.data[j].arg.xferred.res = r; cable->done.data[j].arg.xferred.out = cable->todo.data[i].arg.transfer.out; - }; + } break; - }; + } case CABLE_GET_TDO: j = cable_add_queue_item( cable, &(cable->done) ); #ifdef VERBOSE @@ -167,7 +167,7 @@ do_one_queued_action( cable_t *cable ) cable->driver->get_signal( cable, cable->todo.data[i].arg.value.sig ); break; - }; + } #ifdef VERBOSE printf("do_one_queued done\n"); #endif @@ -249,7 +249,7 @@ generic_flush_using_transfer( cable_t *cable, cable_flush_amount_t how_much ) } i++; if(i >= cable->todo.max_items) i = 0; - }; + } #ifdef VERBOSE printf("%d combined into one (%d bits)\n", n, bits); @@ -272,7 +272,7 @@ generic_flush_using_transfer( cable_t *cable, cable_flush_amount_t how_much ) if(out != NULL) free(out); generic_flush_one_by_one( cable, how_much ); break; - }; + } for(j=0, bits=0, i=cable->todo.next_item; jtodo.data[i].arg.transfer.in, len); bits += len; - }; - }; + } + } i++; if(i >= cable->todo.max_items) i = 0; - }; + } /* Step 3: Do the transfer */ r = cable->driver->transfer( cable, bits, in, out ); #ifdef VERBOSE printf("in: "); print_vector(bits,in); printf("\n"); - if(out) { printf("out: "); print_vector(bits,out); printf("\n"); }; + if(out) { printf("out: "); print_vector(bits,out); printf("\n"); } #endif /* Step 4: Pick results from transfer */ @@ -341,7 +341,7 @@ generic_flush_using_transfer( cable_t *cable, cable_flush_amount_t how_much ) } if(len>0) bits += len; if(bits>0) tdo = out[bits-1]; - }; + } i++; if(i >= cable->todo.max_items) i = 0; } diff --git a/jtag/src/tap/cable/jim.c b/jtag/src/tap/cable/jim.c index da0e2f22..4a48bc85 100644 --- a/jtag/src/tap/cable/jim.c +++ b/jtag/src/tap/cable/jim.c @@ -91,7 +91,7 @@ jim_cable_free( cable_t *cable ) { jim_free( ((jim_cable_params_t*)(cable->params))->s ); free( cable->params ); - }; + } free( cable ); } diff --git a/jtag/src/tap/cable/jlink.c b/jtag/src/tap/cable/jlink.c index 13950c93..ffde590a 100644 --- a/jtag/src/tap/cable/jlink.c +++ b/jtag/src/tap/cable/jlink.c @@ -184,7 +184,7 @@ static int jlink_get_status( libusb_param_t *params ) { ERROR("Vref too low. Eventually the target isn't powered or disconnected?\n"); result = -15; - }; + } } else { @@ -215,7 +215,7 @@ static void jlink_tap_append_step( jlink_usbconn_data_t *data, int tms, int tdi) { data->tms_buffer[index] = 0; data->tdi_buffer[index] = 0; - }; + } if(tms) data->tms_buffer[index] |= bit; if(tdi) data->tdi_buffer[index] |= bit; @@ -549,7 +549,7 @@ jlink_transfer( cable_t *cable, int len, char *in, char *out ) if(out) jlink_copy_out_data( data, i-j, j, out); j = i; } - }; + } if(data->tap_length > 0) { jlink_tap_execute( params ); diff --git a/jtag/src/tap/cable/xpc.c b/jtag/src/tap/cable/xpc.c index d0ab8897..77090e7a 100644 --- a/jtag/src/tap/cable/xpc.c +++ b/jtag/src/tap/cable/xpc.c @@ -295,7 +295,7 @@ xpcu_common_init( cable_t *cable ) if (r>=0) { printf("firmware version = 0x%04X (%u)\n", buf, buf); - }; + } /* Read CPLD version (via GPIF) */ @@ -307,13 +307,13 @@ xpcu_common_init( cable_t *cable ) { printf("Warning: version '0' can't be correct. Please try resetting the cable\n"); r = -1; - }; - }; + } + } if (r<0) { usb_close(xpcu); - }; + } return r; } @@ -561,7 +561,7 @@ xpcu_add_bit_for_ext_transfer( xpc_ext_transfer_state_t *xts, char in, char is_r { xts->buf[buf_idx] = 0; xts->buf[buf_idx+1] = 0; - }; + } xts->in_bits++; @@ -611,7 +611,7 @@ xpc_ext_transfer( cable_t *cable, int len, char *in, char *out ) { j = xpcu_do_ext_transfer( &xts ); } - }; + } if(xts.in_bits > 0 && j>=0) { diff --git a/jtag/src/tap/usbconn/libusb.c b/jtag/src/tap/usbconn/libusb.c index e50c166a..a8228100 100644 --- a/jtag/src/tap/usbconn/libusb.c +++ b/jtag/src/tap/usbconn/libusb.c @@ -153,7 +153,7 @@ usbconn_libusb_connect( const char **param, int paramc, usbconn_cable_t *templat if (libusb_conn) free(libusb_conn); return NULL; - }; + } libusb_params->dev = found_dev; libusb_params->handle = NULL;