Fix a few warnings that came up recently (some of them only triggered
by recent GCC versions). * config_gram.y (parse_cmdbits): "brkt possibly used uninitialized" (GCC errs here) * jtagmkII.c (jtagmkII_reset32): "status possibly used uninitialized" (I think GCC errs, too) * buspirate.c: "pointers differ in signedness" (mismatch between string processing and the use of "unsigned char" throughought the AVRDUDE API) git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@882 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
9e02e561fa
commit
31b4ffcca7
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2010-01-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
Fix a few warnings that came up recently (some of them only triggered
|
||||
by recent GCC versions).
|
||||
* config_gram.y (parse_cmdbits): "brkt possibly used uninitialized"
|
||||
(GCC errs here)
|
||||
* jtagmkII.c (jtagmkII_reset32): "status possibly used uninitialized"
|
||||
(I think GCC errs, too)
|
||||
* buspirate.c: "pointers differ in signedness" (mismatch between
|
||||
string processing and the use of "unsigned char" throughought the
|
||||
AVRDUDE API)
|
||||
|
||||
2010-01-01 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
* jtagmkII.c (jtagmkII_smc_init32): replace sleep() by usleep() for
|
||||
|
|
14
buspirate.c
14
buspirate.c
|
@ -89,14 +89,14 @@ buspirate_uses_ascii(struct programmer_t *pgm)
|
|||
|
||||
/* ====== Serial talker functions - binmode ====== */
|
||||
|
||||
static void dump_mem(unsigned char *buf, size_t len)
|
||||
static void dump_mem(char *buf, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i<len; i++) {
|
||||
if (i % 8 == 0)
|
||||
fprintf(stderr, "\t");
|
||||
fprintf(stderr, "0x%02x ", buf[i] & 0xFF);
|
||||
fprintf(stderr, "0x%02x ", (unsigned)buf[i] & 0xFF);
|
||||
if (i % 8 == 3)
|
||||
fprintf(stderr, " ");
|
||||
else if (i % 8 == 7)
|
||||
|
@ -115,7 +115,7 @@ static int buspirate_send_bin(struct programmer_t *pgm, char *data, size_t len)
|
|||
dump_mem(data, len);
|
||||
}
|
||||
|
||||
rc = serial_send(&pgm->fd, data, len);
|
||||
rc = serial_send(&pgm->fd, (unsigned char *)data, len);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ static int buspirate_recv_bin(struct programmer_t *pgm, char *buf, size_t len)
|
|||
{
|
||||
int rc;
|
||||
|
||||
rc = serial_recv(&pgm->fd, buf, len);
|
||||
rc = serial_recv(&pgm->fd, (unsigned char *)buf, len);
|
||||
if (rc < 0)
|
||||
return EOF;
|
||||
if (verbose > 1) {
|
||||
|
@ -394,7 +394,7 @@ static void buspirate_reset_from_binmode(struct programmer_t *pgm)
|
|||
|
||||
static int buspirate_start_spi_mode_bin(struct programmer_t *pgm)
|
||||
{
|
||||
unsigned char buf[20] = { '\0' };
|
||||
char buf[20] = { '\0' };
|
||||
|
||||
/* == Switch to binmode - send 20x '\0' == */
|
||||
buspirate_send_bin(pgm, buf, sizeof(buf));
|
||||
|
@ -596,8 +596,8 @@ static int buspirate_cmd_bin(struct programmer_t *pgm,
|
|||
if (!buspirate_expect_bin_byte(pgm, 0x13, 0x01))
|
||||
return -1;
|
||||
|
||||
buspirate_send_bin(pgm, cmd, 4);
|
||||
buspirate_recv_bin(pgm, res, 4);
|
||||
buspirate_send_bin(pgm, (char *)cmd, 4);
|
||||
buspirate_recv_bin(pgm, (char *)res, 4);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1395,7 +1395,7 @@ static int parse_cmdbits(OPCODE * op)
|
|||
char * e;
|
||||
char * q;
|
||||
int len;
|
||||
char * s, *brkt;
|
||||
char * s, *brkt = NULL;
|
||||
|
||||
bitno = 32;
|
||||
while (lsize(string_list)) {
|
||||
|
|
|
@ -2618,6 +2618,8 @@ static int jtagmkII_reset32(PROGRAMMER * pgm, unsigned short flags)
|
|||
"%s: jtagmkII_reset32(%2.2x)\n",
|
||||
progname, flags);
|
||||
|
||||
status = -1;
|
||||
|
||||
// Happens at the start of a programming operation
|
||||
if(flags & AVR32_RESET_READ) {
|
||||
buf[0] = CMND_GET_IR;
|
||||
|
|
Loading…
Reference in New Issue