less warnings
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 18 Jun 2009 13:35:18 +0000 (13:35 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 18 Jun 2009 13:35:18 +0000 (13:35 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2287 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/ecosboard.c

index 0b1bf36ee6d5dea99b7392df2255e5562046aecd..d49abbd1594a1bb2b6009b7236ee06a04edf8b05 100644 (file)
@@ -296,18 +296,16 @@ void format(void)
        }
 
        cyg_io_flash_getconfig_erase_t e;
-       void *err_addr;
        len = sizeof(e);
 
        e.offset = 0;
        e.len = ds.dev_size;
-       e.err_address = &err_addr;
 
        diag_printf("Formatting 0x%08x bytes\n", (int)ds.dev_size);
        err = cyg_io_get_config(handle, CYG_IO_GET_CONFIG_FLASH_ERASE, &e, &len);
        if (err != ENOERR)
        {
-               diag_printf("Flash erase error %d offset 0x%p\n", err, err_addr);
+               diag_printf("Flash erase error %d offset 0x%p\n", err, e.err_address);
                reboot();
        }
 
@@ -633,9 +631,9 @@ static void zylinjtag_uart(cyg_addrword_t data)
 #ifdef CYGPKG_PROFILE_GPROF
                start_profile();
 #endif
-               int actual = 0;
-               int actual2 = 0;
-               int pos, pos2;
+               size_t actual = 0;
+               size_t actual2 = 0;
+               size_t pos, pos2;
                pos = 0;
                pos2 = 0;
                cur = 0;
@@ -668,9 +666,11 @@ static void zylinjtag_uart(cyg_addrword_t data)
                        if (actual2 <= 0)
                        {
                                memset(backwardBuffer, 's', sizeof(backwardBuffer));
-                               actual2 = read(serHandle, backwardBuffer,
+                               int t;
+                               t = read(serHandle, backwardBuffer,
                                                sizeof(backwardBuffer));
-                               if (actual2 < 0)
+                               actual2 = t;
+                               if (t < 0)
                                {
                                        if (errno != EAGAIN)
                                        {
@@ -681,8 +681,8 @@ static void zylinjtag_uart(cyg_addrword_t data)
                                pos2 = 0;
                        }
 
-                       int x = actual2;
-                       int y = 0;
+                       size_t x = actual2;
+                       size_t y = 0;
                        if (actual2 > 0)
                        {
                                int written = write(session, backwardBuffer + pos2, actual2);

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)