From 0926a2cbd7bdf982073cad49977841f263326779 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Tue, 13 Sep 2011 15:14:53 +0000 Subject: [PATCH] In stk500v2_command(), treat warnings as errors rather than success. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1006 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 5 +++++ stk500v2.c | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b466efa2..803467f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-09-13 Joerg Wunsch + + * stk500v2.c (stk500v2_command): Treat warnings as errors rather than + success. + 2011-08-30 Joerg Wunsch bug #34027: avrdude AT90S1200 Problem (part 3 - documentation) diff --git a/stk500v2.c b/stk500v2.c index 2fd5e944..5fde88a1 100644 --- a/stk500v2.c +++ b/stk500v2.c @@ -787,18 +787,20 @@ retry: msg = msgbuf; break; } - if (quell_progress < 2) + if (quell_progress < 2) { fprintf(stderr, "%s: stk500v2_command(): warning: %s\n", progname, msg); - buf[1] = STATUS_CMD_OK; /* pretend success */ - } - if (buf[1] == STATUS_CMD_OK) + } + } else if (buf[1] == STATUS_CMD_OK) { return status; - if (buf[1] == STATUS_CMD_FAILED) - fprintf(stderr, "%s: stk500v2_command(): command failed\n", progname); - else + } else if (buf[1] == STATUS_CMD_FAILED) { + fprintf(stderr, + "%s: stk500v2_command(): command failed\n", + progname); + } else { fprintf(stderr, "%s: stk500v2_command(): unknown status 0x%02x\n", progname, buf[1]); + } return -1; } }