Zach Welch <zw@superlucidity.net> fix -Werror warnings
[openocd.git] / src / target / xscale.c
index a11ed71bc8f71d3d3b4d48d35cb1d3783992d469..c3b8d3358822724130cb2109759da7be57c2021f 100644 (file)
@@ -229,7 +229,7 @@ int xscale_jtag_set_instr(jtag_tap_t *tap, u32 new_instr)
                field.in_value = NULL;
                jtag_set_check_value(&field, tap->expected, tap->expected_mask, NULL);
 
-               jtag_add_ir_scan(1, &field, -1);
+               jtag_add_ir_scan(1, &field, TAP_INVALID);
 
                free(field.out_value);
        }
@@ -282,7 +282,7 @@ int xscale_read_dcsr(target_t *target)
        fields[2].in_value = NULL;
        jtag_set_check_value(fields+2, &field2_check_value, &field2_check_mask, NULL);
 
-       jtag_add_dr_scan(3, fields, -1);
+       jtag_add_dr_scan(3, fields, TAP_INVALID);
 
        if ((retval = jtag_execute_queue()) != ERROR_OK)
        {
@@ -302,7 +302,7 @@ int xscale_read_dcsr(target_t *target)
 
        jtag_add_end_state(TAP_IDLE);
 
-       jtag_add_dr_scan(3, fields, -1);
+       jtag_add_dr_scan(3, fields, TAP_INVALID);
 
        /* DANGER!!! this must be here. It will make sure that the arguments
         * to jtag_set_check_value() does not go out of scope! */
@@ -362,7 +362,7 @@ int xscale_receive(target_t *target, u32 *buffer, int num_words)
 
        jtag_add_end_state(TAP_IDLE);
        xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.dbgtx);
-       jtag_add_runtest(1, -1); /* ensures that we're in the TAP_IDLE state as the above could be a no-op */
+       jtag_add_runtest(1, TAP_INVALID); /* ensures that we're in the TAP_IDLE state as the above could be a no-op */
 
        /* repeat until all words have been collected */
        int attempts=0;
@@ -750,7 +750,7 @@ int xscale_write_dcsr(target_t *target, int hold_rst, int ext_dbg_brk)
        fields[2].in_value = NULL;
        jtag_set_check_value(fields+2, &field2_check_value, &field2_check_mask, NULL);
 
-       jtag_add_dr_scan(3, fields, -1);
+       jtag_add_dr_scan(3, fields, TAP_INVALID);
 
        if ((retval = jtag_execute_queue()) != ERROR_OK)
        {
@@ -822,7 +822,7 @@ int xscale_load_ic(target_t *target, int mini, u32 va, u32 buffer[8])
        fields[1].in_handler = NULL;
        fields[1].in_handler_priv = NULL;
 
-       jtag_add_dr_scan(2, fields, -1);
+       jtag_add_dr_scan(2, fields, TAP_INVALID);
 
        fields[0].num_bits = 32;
        fields[0].out_value = packet;
@@ -834,7 +834,7 @@ int xscale_load_ic(target_t *target, int mini, u32 va, u32 buffer[8])
        {
                buf_set_u32(packet, 0, 32, buffer[word]);
                cmd = parity(*((u32*)packet));
-               jtag_add_dr_scan(2, fields, -1);
+               jtag_add_dr_scan(2, fields, TAP_INVALID);
        }
 
        jtag_execute_queue();
@@ -880,7 +880,7 @@ int xscale_invalidate_ic_line(target_t *target, u32 va)
        fields[1].in_handler = NULL;
        fields[1].in_handler_priv = NULL;
 
-       jtag_add_dr_scan(2, fields, -1);
+       jtag_add_dr_scan(2, fields, TAP_INVALID);
 
        return ERROR_OK;
 }
@@ -1631,7 +1631,7 @@ int xscale_deassert_reset(target_t *target)
        u32 binary_size;
 
        u32 buf_cnt;
-       int i;
+       u32 i;
        int retval;
 
        breakpoint_t *breakpoint = target->breakpoints;
@@ -1928,7 +1928,7 @@ int xscale_read_memory(struct target_s *target, u32 address, u32 size, u32 count
        armv4_5_common_t *armv4_5 = target->arch_info;
        xscale_common_t *xscale = armv4_5->arch_info;
        u32 *buf32;
-       int i;
+       u32 i;
        int retval;
 
        LOG_DEBUG("address: 0x%8.8x, size: 0x%8.8x, count: 0x%8.8x", address, size, count);
@@ -2933,7 +2933,7 @@ int xscale_analyze_trace(target_t *target, command_context_t *cmd_ctx)
                                                (((instruction.type == ARM_B) ||
                                                        (instruction.type == ARM_BL) ||
                                                        (instruction.type == ARM_BLX)) &&
-                                                       (instruction.info.b_bl_bx_blx.target_address != -1)))
+                                                       (instruction.info.b_bl_bx_blx.target_address != ~0UL)))
                                        {
                                                xscale->trace.current_pc = instruction.info.b_bl_bx_blx.target_address;
                                        }

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)