bug #39794: warnings when building avrdude 6.0rc1 under CentOS 6.4

* buspirate.c: Turn the "cmd" argument of the various methods into
a "const unsigned char *"; while doing this, declare all arrays being
passed as arguments to be pointers rather than arrays, as the latter
obfuscates the way arrays are being passed to a callee in C.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1196 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2013-09-02 20:22:53 +00:00
parent 51da59044e
commit db1cce8bf4
16 changed files with 95 additions and 67 deletions

View File

@@ -790,8 +790,8 @@ static void buspirate_powerdown(struct programmer_t *pgm)
}
static int buspirate_cmd_bin(struct programmer_t *pgm,
unsigned char cmd[4],
unsigned char res[4])
const unsigned char *cmd,
unsigned char *res)
{
/* 0001xxxx - Bulk transfer, send/read 1-16 bytes (0=1byte!)
* we are sending 4 bytes -> 0x13 */
@@ -805,8 +805,8 @@ static int buspirate_cmd_bin(struct programmer_t *pgm,
}
static int buspirate_cmd_ascii(struct programmer_t *pgm,
unsigned char cmd[4],
unsigned char res[4])
const unsigned char *cmd,
unsigned char *res)
{
char buf[25];
char *rcvd;
@@ -838,8 +838,8 @@ static int buspirate_cmd_ascii(struct programmer_t *pgm,
}
static int buspirate_cmd(struct programmer_t *pgm,
unsigned char cmd[4],
unsigned char res[4])
const unsigned char *cmd,
unsigned char *res)
{
if (pgm->flag & BP_FLAG_IN_BINMODE)
return buspirate_cmd_bin(pgm, cmd, res);