MIPS: no exit() calls
[openocd.git] / src / target / target.c
index f5a092a707ed1b5e764a9531a72b17524abbf6f7..c00c2ed9d78075e7e3471408764e141047f557f2 100644 (file)
@@ -1967,7 +1967,7 @@ COMMAND_HANDLER(handle_reg_command)
        /* set register value */
        if (argc == 2)
        {
-               uint8_t *buf = malloc(CEIL(reg->size, 8));
+               uint8_t *buf = malloc(DIV_ROUND_UP(reg->size, 8));
                str_to_buf(args[1], strlen(args[1]), buf, reg->size, 0);
 
                struct reg_arch_type *arch_type = register_get_arch_type(reg->arch_type);
@@ -2399,7 +2399,7 @@ static COMMAND_HELPER(parse_load_image_command_args, struct image *image,
 COMMAND_HANDLER(handle_load_image_command)
 {
        uint8_t *buffer;
-       uint32_t buf_cnt;
+       size_t buf_cnt;
        uint32_t image_size;
        uint32_t min_address = 0;
        uint32_t max_address = 0xffffffff;
@@ -2519,7 +2519,7 @@ COMMAND_HANDLER(handle_dump_image_command)
        int retval = ERROR_OK;
        while (size > 0)
        {
-               uint32_t size_written;
+               size_t size_written;
                uint32_t this_run_size = (size > 560) ? 560 : size;
                retval = target_read_buffer(target, address, this_run_size, buffer);
                if (retval != ERROR_OK)
@@ -2543,7 +2543,7 @@ COMMAND_HANDLER(handle_dump_image_command)
        if ((ERROR_OK == retval) && (duration_measure(&bench) == ERROR_OK))
        {
                command_print(cmd_ctx,
-                               "dumped %lld bytes in %fs (%0.3f kb/s)", fileio.size,
+                               "dumped %zu bytes in %fs (%0.3f kb/s)", fileio.size,
                                duration_elapsed(&bench), duration_kbps(&bench, fileio.size));
        }
 
@@ -2553,7 +2553,7 @@ COMMAND_HANDLER(handle_dump_image_command)
 static COMMAND_HELPER(handle_verify_image_command_internal, int verify)
 {
        uint8_t *buffer;
-       uint32_t buf_cnt;
+       size_t buf_cnt;
        uint32_t image_size;
        int i;
        int retval;
@@ -2674,7 +2674,7 @@ static COMMAND_HELPER(handle_verify_image_command_internal, int verify)
                        }
                } else
                {
-                       command_print(cmd_ctx, "address 0x%08" PRIx32 " length 0x%08" PRIx32 "",
+                       command_print(cmd_ctx, "address 0x%08" PRIx32 " length 0x%08zx",
                                                  image.sections[i].base_address,
                                                  buf_cnt);
                }
@@ -4537,7 +4537,7 @@ static void free_fastload(void)
 COMMAND_HANDLER(handle_fast_load_image_command)
 {
        uint8_t *buffer;
-       uint32_t buf_cnt;
+       size_t buf_cnt;
        uint32_t image_size;
        uint32_t min_address = 0;
        uint32_t max_address = 0xffffffff;

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)