fixes following gcc warning:
error: ignoring return value of write, declared with attribute warn_unused_result
Change-Id: I96ea6649078449208a77690caea2cb237c388e6e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/854
Tested-by: jenkins
Reviewed-by: Marc Reilly <marc@cpdesign.com.au>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
static int last_tdi;
static int first_time;
static int last_tdi;
static int first_time;
if (!first_time) {
last_tck = !tck;
if (!first_time) {
last_tck = !tck;
- if (tdi != last_tdi)
- write(tdi_fd, tdi ? &one : &zero, 1);
- if (tms != last_tms)
- write(tms_fd, tms ? &one : &zero, 1);
+ if (tdi != last_tdi) {
+ bytes_written = write(tdi_fd, tdi ? &one : &zero, 1);
+ if (bytes_written != 1)
+ LOG_WARNING("writing tdi failed");
+ }
+
+ if (tms != last_tms) {
+ bytes_written = write(tms_fd, tms ? &one : &zero, 1);
+ if (bytes_written != 1)
+ LOG_WARNING("writing tms failed");
+ }
+
- if (tck != last_tck)
- write(tck_fd, tck ? &one : &zero, 1);
+ if (tck != last_tck) {
+ bytes_written = write(tck_fd, tck ? &one : &zero, 1);
+ if (bytes_written != 1)
+ LOG_WARNING("writing tck failed");
+ }
last_tdi = tdi;
last_tms = tms;
last_tdi = tdi;
last_tms = tms;
{
const char one[] = "1";
const char zero[] = "0";
{
const char one[] = "1";
const char zero[] = "0";
- if (srst_fd >= 0)
- write(srst_fd, srst ? &zero : &one, 1);
+ if (srst_fd >= 0) {
+ bytes_written = write(srst_fd, srst ? &zero : &one, 1);
+ if (bytes_written != 1)
+ LOG_WARNING("writing srst failed");
+ }
- if (trst_fd >= 0)
- write(trst_fd, trst ? &zero : &one, 1);
+ if (trst_fd >= 0) {
+ bytes_written = write(trst_fd, trst ? &zero : &one, 1);
+ if (bytes_written != 1)
+ LOG_WARNING("writing trst failed");
+ }
}
/* No speed control is implemented yet */
}
/* No speed control is implemented yet */
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)