diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 1dc0d1c7..40275ba8 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2007-12-19 Kolja Waschk + + * tap/cable/*, tap/parport/xpcu_common.c, cmd/part.c, cmd/cable.c, + bus/pxa2x0.c, jtag.c: fix prototypes, include stdlib (thx Hartley) + 2007-12-18 Kolja Waschk #include +#include #include "parport.h" #include "tap.h" diff --git a/jtag/src/cmd/part.c b/jtag/src/cmd/part.c index 7a21f0ea..955fbc01 100644 --- a/jtag/src/cmd/part.c +++ b/jtag/src/cmd/part.c @@ -26,6 +26,7 @@ #include #include +#include #include "jtag.h" diff --git a/jtag/src/jtag.c b/jtag/src/jtag.c index 4e8fc774..12ab7472 100644 --- a/jtag/src/jtag.c +++ b/jtag/src/jtag.c @@ -330,9 +330,9 @@ cleanup( void ) } int -main( int argc, const char **argv ) +main( int argc, char *const argv[] ) { - int go; + int go = 0; int i; int c; int norc = 0; diff --git a/jtag/src/tap/cable/ft2232.c b/jtag/src/tap/cable/ft2232.c index f8f4ce1d..c6b4d72b 100644 --- a/jtag/src/tap/cable/ft2232.c +++ b/jtag/src/tap/cable/ft2232.c @@ -467,7 +467,7 @@ ft2232_transfer( cable_t *cable, int len, char *in, char *out ) } void -ft2232_usbcable_help(char *cablename) +ft2232_usbcable_help( const char *cablename ) { printf( _( "Usage: cable %s ftdi-mpsse VID:PID\n" diff --git a/jtag/src/tap/cable/generic.c b/jtag/src/tap/cable/generic.c index 37b7c61e..9a8b2349 100644 --- a/jtag/src/tap/cable/generic.c +++ b/jtag/src/tap/cable/generic.c @@ -125,7 +125,7 @@ generic_get_trst( cable_t *cable ) } void -generic_lptcable_help( char *cablename ) +generic_lptcable_help( const char *cablename ) { printf( _( "Usage: cable %s parallel PORTADDR\n" diff --git a/jtag/src/tap/cable/generic.h b/jtag/src/tap/cable/generic.h index a43c1aa5..04343352 100644 --- a/jtag/src/tap/cable/generic.h +++ b/jtag/src/tap/cable/generic.h @@ -42,6 +42,6 @@ void generic_cable_free( cable_t *cable ); void generic_done( cable_t *cable ); int generic_transfer( cable_t *cable, int len, char *in, char *out ); int generic_get_trst( cable_t *cable ); -void generic_lptcable_help( char *name ); +void generic_lptcable_help( const char *name ); #endif /* GENERIC_H */ diff --git a/jtag/src/tap/cable/keithkoep.c b/jtag/src/tap/cable/keithkoep.c index a7786aad..3c91e03c 100644 --- a/jtag/src/tap/cable/keithkoep.c +++ b/jtag/src/tap/cable/keithkoep.c @@ -121,5 +121,5 @@ cable_driver_t keithkoep_cable_driver = { generic_transfer, keithkoep_set_trst, generic_get_trst, - generic_lptcable_help, + generic_lptcable_help }; diff --git a/jtag/src/tap/cable/mpcbdm.c b/jtag/src/tap/cable/mpcbdm.c index 6958b8c8..8d56f773 100644 --- a/jtag/src/tap/cable/mpcbdm.c +++ b/jtag/src/tap/cable/mpcbdm.c @@ -118,5 +118,5 @@ cable_driver_t mpcbdm_cable_driver = { generic_transfer, mpcbdm_set_trst, generic_get_trst, - generic_lptcable_help, + generic_lptcable_help }; diff --git a/jtag/src/tap/cable/triton.c b/jtag/src/tap/cable/triton.c index c05454c8..976a0419 100644 --- a/jtag/src/tap/cable/triton.c +++ b/jtag/src/tap/cable/triton.c @@ -123,5 +123,5 @@ cable_driver_t triton_cable_driver = { generic_transfer, triton_set_trst, generic_get_trst, - generic_lptcable_help, + generic_lptcable_help }; diff --git a/jtag/src/tap/cable/usbblaster.c b/jtag/src/tap/cable/usbblaster.c index a1636a3e..a95d060b 100644 --- a/jtag/src/tap/cable/usbblaster.c +++ b/jtag/src/tap/cable/usbblaster.c @@ -164,7 +164,7 @@ usbblaster_transfer( cable_t *cable, int len, char *in, char *out ) } void -usbblaster_help(char *cablename) +usbblaster_help( const char *cablename ) { printf( _( "Usage: cable %s ftdi VID:PID\n" diff --git a/jtag/src/tap/cable/wiggler.c b/jtag/src/tap/cable/wiggler.c index b9acf266..7f7f19f2 100644 --- a/jtag/src/tap/cable/wiggler.c +++ b/jtag/src/tap/cable/wiggler.c @@ -120,7 +120,8 @@ cable_driver_t wiggler_cable_driver = { wiggler_get_tdo, generic_transfer, wiggler_set_trst, - generic_get_trst + generic_get_trst, + generic_lptcable_help }; cable_driver_t igloo_cable_driver = { @@ -136,6 +137,6 @@ cable_driver_t igloo_cable_driver = { generic_transfer, wiggler_set_trst, generic_get_trst, - generic_lptcable_help, + generic_lptcable_help }; diff --git a/jtag/src/tap/cable/wiggler2.c b/jtag/src/tap/cable/wiggler2.c index 6f5daac1..c62efc8a 100644 --- a/jtag/src/tap/cable/wiggler2.c +++ b/jtag/src/tap/cable/wiggler2.c @@ -128,5 +128,5 @@ cable_driver_t wiggler2_cable_driver = { generic_transfer, wiggler2_set_trst, generic_get_trst, - generic_lptcable_help, + generic_lptcable_help }; diff --git a/jtag/src/tap/cable/xpc.c b/jtag/src/tap/cable/xpc.c index b5c0140e..dff0f142 100644 --- a/jtag/src/tap/cable/xpc.c +++ b/jtag/src/tap/cable/xpc.c @@ -95,7 +95,7 @@ xpc_set_trst( cable_t *cable, int trst ) } void -xpcu_usbcable_help(char *cablename) +xpcu_usbcable_help( const char *cablename ) { printf( _( "Usage: cable %s xpcu VID:PID\n" @@ -122,12 +122,6 @@ cable_driver_t xpc_int_cable_driver = { xpcu_usbcable_help }; -void -xpc_ext_usbcable_help() -{ - xpcu_usbcable_help("xpc_ext"); -} - cable_driver_t xpc_ext_cable_driver = { "xpc_ext", N_("Xilinx Platform Cable USB external chain"), diff --git a/jtag/src/tap/parport/xpcu_common.c b/jtag/src/tap/parport/xpcu_common.c index f410257f..b8266f32 100644 --- a/jtag/src/tap/parport/xpcu_common.c +++ b/jtag/src/tap/parport/xpcu_common.c @@ -151,7 +151,7 @@ int xpcu_write_gpio(struct usb_dev_handle *xpcu, uint8_t bits) int xpcu_read_gpio(struct usb_dev_handle *xpcu, uint8_t *bits) { - if(usb_control_msg(xpcu, 0xC0, 0xB0, 0x0038, 0, bits, 1, 1000)<0) + if(usb_control_msg(xpcu, 0xC0, 0xB0, 0x0038, 0, (char*)bits, 1, 1000)<0) { perror("usb_control_msg(0x38.0x00) (read port E)"); return -1;