Zach Welch <zw@superlucidity.net> fix -Werror warnings
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 19 Apr 2009 20:51:16 +0000 (20:51 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 19 Apr 2009 20:51:16 +0000 (20:51 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1472 b42882b7-edfa-0310-969c-e2dbd0fdcd60

31 files changed:
src/helper/binarybuffer.c
src/jtag/jtag.c
src/jtag/rlink/rlink.c
src/pld/virtex2.c
src/pld/xilinx_bit.c
src/server/gdb_server.c
src/svf/svf.c
src/target/arm720t.h
src/target/arm7_9_common.c
src/target/arm7_9_common.h
src/target/arm920t.h
src/target/arm926ejs.h
src/target/arm_jtag.h
src/target/armv4_5.c
src/target/armv7m.c
src/target/cortex_m3.c
src/target/embeddedice.c
src/target/etb.c
src/target/etb.h
src/target/etm.c
src/target/feroceon.c
src/target/mips32.h
src/target/mips_ejtag.c
src/target/oocd_trace.c
src/target/register.h
src/target/target.c
src/target/target_request.c
src/target/trace.c
src/target/trace.h
src/target/xscale.c
src/xsvf/xsvf.c

index 12c9391c59fd621de4c8b3aac7bdd1a1f5e90a2d..a8be403cd5319b6de1cc91755207169710307967 100644 (file)
@@ -55,7 +55,7 @@ const unsigned char bit_reverse_table256[] =
 
 u8* buf_cpy(u8 *from, u8 *to, int size)
 {
-       int num_bytes = CEIL(size, 8);
+       unsigned int num_bytes = CEIL(size, 8);
        unsigned int i;
 
        if (from == NULL)
@@ -244,7 +244,7 @@ char* buf_to_str(const u8 *buf, int buf_len, int radix)
 int str_to_buf(const char *str, int str_len, u8 *buf, int buf_len, int radix)
 {
        char *charbuf;
-       u32 tmp;
+       char tmp;
        float factor;
        u8 *b256_buf;
        int b256_len;
index a9a4b30cbb21c090adaffa6da235b4665627f2cb..c4a231e187d503e8b96c612a4ac690bd6d806556 100644 (file)
@@ -1758,7 +1758,7 @@ static int jtag_tap_configure_cmd( Jim_GetOptInfo *goi, jtag_tap_t * tap)
                                        jteap = tap->event_action;
                                        /* replace existing? */
                                        while (jteap) {
-                                               if (jteap->event == n->value) {
+                                               if (jteap->event == (enum jtag_tap_event)n->value) {
                                                        break;
                                                }
                                                jteap = jteap->next;
index 58067fbe35c29b5248d61ff5faba1398a2d24509..af3a0f47cabd94c5769b8ed7f7297df5e29051ac 100644 (file)
@@ -268,7 +268,7 @@ ep1_memory_write(
                        USB_TIMEOUT_MS
                );
 
-               if(usb_ret < sizeof(usb_buffer)) {
+               if((size_t)usb_ret < sizeof(usb_buffer)) {
                        break;
                }
 
@@ -363,7 +363,7 @@ dtc_load_from_buffer(
                buffer += sizeof(*header);
                length -= sizeof(*header);
 
-               if(length < header->length + 1) {
+               if(length < (size_t)header->length + 1) {
                        LOG_ERROR("Malformed DTC image\n");
                        exit(1);
                }
@@ -605,8 +605,8 @@ static
 struct {
        dtc_reply_queue_entry_t *rq_head;
        dtc_reply_queue_entry_t *rq_tail;
-       int                     cmd_index;
-       int                     reply_index;
+       u32                     cmd_index;
+       u32                     reply_index;
        u8                      cmd_buffer[USB_EP2BANK_SIZE];
 } dtc_queue;
 
@@ -617,7 +617,7 @@ struct {
 
 static
 struct {
-       int     length;
+       u32     length;
        u32     buffer;
 } tap_state_queue;
 
index 6cce199732692094448ccc228d7b923a1e4e4af6..7be68037ddac49a9ace7d0c910172af364f3f9f8 100644 (file)
@@ -161,7 +161,7 @@ int virtex2_load(struct pld_device_s *pld_device, char *filename)
        virtex2_pld_device_t *virtex2_info = pld_device->driver_priv;
        xilinx_bit_file_t bit_file;
        int retval;
-       int i;
+       unsigned int i;
 
        scan_field_t field;
 
index c8c825dd915b066eeb32309ffda7235275e74bf4..8dd2ee460ccd738e3cf755a4b4cfe25d4752694e 100644 (file)
@@ -40,7 +40,7 @@
 int read_section(FILE *input_file, int length_size, char section, u32 *buffer_length, u8 **buffer) 
 {
        u8 length_buffer[4];
-       u32 length;
+       int length;
        char section_char;
        int read_count;
        
index 9ae345afe19c7c94fd334af032fbf736b1debcb5..7ba5281bd7898413b42e682c4d8445a792801fbb 100644 (file)
@@ -348,7 +348,7 @@ int gdb_put_packet_inner(connection_t *connection, char *buffer, int len)
 
                char local_buffer[1024];
                local_buffer[0] = '$';
-               if (len+4 <= sizeof(local_buffer))
+               if ((size_t)len + 4 <= sizeof(local_buffer))
                {
                        /* performance gain on smaller packets by only a single call to gdb_write() */
                        memcpy(local_buffer+1, buffer, len++);
@@ -1213,7 +1213,7 @@ int gdb_read_memory_packet(connection_t *connection, target_t *target, char *pac
        {
                hex_buffer = malloc(len * 2 + 1);
 
-               int i;
+               u32 i;
                for (i = 0; i < len; i++)
                {
                        u8 t = buffer[i];
@@ -1243,7 +1243,7 @@ int gdb_write_memory_packet(connection_t *connection, target_t *target, char *pa
 
        u8 *buffer;
 
-       int i;
+       u32 i;
        int retval;
 
        /* skip command character */
@@ -1540,12 +1540,12 @@ static int decode_xfer_read(char *buf, char **annex, int *ofs, unsigned int *len
 
 int gdb_calc_blocksize(flash_bank_t *bank)
 {
-       int i;
-       int block_size = 0xffffffff;
+       u32 i;
+       u32 block_size = 0xffffffff;
 
        /* loop through all sectors and return smallest sector size */
 
-       for (i = 0; i < bank->num_sectors; i++)
+       for (i = 0; i < (u32)bank->num_sectors; i++)
        {
                if (bank->sectors[i].size < block_size)
                        block_size = bank->sectors[i].size;
index f1a52da09d727fd629b4f7af1936eb476afe1a14..01e5631c0f66072a927e11902cb2d348096e402f 100644 (file)
@@ -103,7 +103,7 @@ const char *svf_trst_mode_name[4] =
        "ABSENT"
 };
 
-char *svf_tap_state_name[16];
+char *svf_tap_state_name[TAP_NUM_STATES];
 
 #define XXR_TDI                                                (1 << 0)
 #define XXR_TDO                                                (1 << 1)
@@ -316,7 +316,7 @@ static int handle_svf_command(struct command_context_s *cmd_ctx, char *cmd, char
        svf_buffer_size = 2 * SVF_MAX_BUFFER_SIZE_TO_COMMIT;
 
        memcpy(&svf_para, &svf_para_init, sizeof(svf_para));
-       for (i = 0; i < dimof(svf_tap_state_name); i++)
+       for (i = 0; i < (int)dimof(svf_tap_state_name); i++)
        {
                svf_tap_state_name[i] = (char *)tap_state_name(i);
        }
@@ -515,7 +515,7 @@ static int svf_tap_state_is_stable(tap_state_t state)
 
 static int svf_tap_state_is_valid(tap_state_t state)
 {
-       return ((state >= 0) && (state < sizeof(svf_tap_state_name)));
+       return state >= 0 && state < TAP_NUM_STATES;
 }
 
 static int svf_find_string_in_array(char *str, char **strs, int num_of_element)
index d16e3e6b5d73e6065d48991b9bd04be6807bead3..f91f150a2f4e092b1da47dffdaf84462285c8206 100644 (file)
@@ -32,7 +32,7 @@
 
 typedef struct arm720t_common_s
 {
-       int common_magic;
+       u32 common_magic;
        armv4_5_mmu_common_t armv4_5_mmu;
        arm7tdmi_common_t arm7tdmi_common;
        u32 cp15_control_reg;
index cdf46a089b57ef4287e2643e01456dd14e47195a..bae7c9985642d6ed9120e9c0f536f2a904d42f5c 100644 (file)
@@ -655,7 +655,8 @@ int arm7_9_target_request_data(target_t *target, u32 size, u8 *buffer)
        arm7_9_common_t *arm7_9 = armv4_5->arch_info;
        arm_jtag_t *jtag_info = &arm7_9->jtag_info;
        u32 *data;
-       int i, retval = ERROR_OK;
+       int retval = ERROR_OK;
+       u32 i;
 
        data = malloc(size * (sizeof(u32)));
 
@@ -1956,7 +1957,7 @@ int arm7_9_read_memory(struct target_s *target, u32 address, u32 size, u32 count
        arm7_9_common_t *arm7_9 = armv4_5->arch_info;
 
        u32 reg[16];
-       int num_accesses = 0;
+       u32 num_accesses = 0;
        int thisrun_accesses;
        int i;
        u32 cpsr;
@@ -2133,7 +2134,7 @@ int arm7_9_write_memory(struct target_s *target, u32 address, u32 size, u32 coun
        reg_t *dbg_ctrl = &arm7_9->eice_cache->reg_list[EICE_DBG_CTRL];
 
        u32 reg[16];
-       int num_accesses = 0;
+       u32 num_accesses = 0;
        int thisrun_accesses;
        int i;
        u32 cpsr;
@@ -2466,7 +2467,7 @@ int arm7_9_checksum_memory(struct target_s *target, u32 address, u32 count, u32*
                0x04C11DB7                              /* CRC32XOR:    .word 0x04C11DB7 */
        };
 
-       int i;
+       u32 i;
 
        if (target_alloc_working_area(target, sizeof(arm7_9_crc_code), &crc_algorithm) != ERROR_OK)
        {
@@ -2518,7 +2519,7 @@ int arm7_9_blank_check_memory(struct target_s *target, u32 address, u32 count, u
        reg_param_t reg_params[3];
        armv4_5_algorithm_t armv4_5_info;
        int retval;
-       int i;
+       u32 i;
 
        u32 erase_check_code[] =
        {
index 3cf905119a79a7d031081536577ec698f125bc2d..de2aef86e29eee1f4d1ec37b0f8609b15f6ac115 100644 (file)
@@ -40,7 +40,7 @@
 
 typedef struct arm7_9_common_s
 {
-       int common_magic;
+       u32 common_magic;
        
        arm_jtag_t jtag_info;
        reg_cache_t *eice_cache;
index e51e651d1237142ac5e031b0c619deb5ede80fa4..e1aab347bfebfca501ddd86e3803cc16f70eeea6 100644 (file)
@@ -32,7 +32,7 @@
 
 typedef struct arm920t_common_s
 {
-       int common_magic;
+       u32 common_magic;
        armv4_5_mmu_common_t armv4_5_mmu;
        arm9tdmi_common_t arm9tdmi_common;
        u32 cp15_control_reg;
index 17705557bf3dc91cf1bac50963a94de683385729..ba5fcc13480288df55d34ef05df7b349b1130802 100644 (file)
@@ -32,7 +32,7 @@
 
 typedef struct arm926ejs_common_s
 {
-       int common_magic;
+       u32 common_magic;
        armv4_5_mmu_common_t armv4_5_mmu;
        arm9tdmi_common_t arm9tdmi_common;
        int (*read_cp15)(target_t *target, u32 op1, u32 op2, u32 CRn, u32 CRm, u32 *value);
index 11f6bd611249e2fd6ec2f79f65aadb21c7abd3b4..da004fcef371f26e4221aae29ab90a840f9c4d80 100644 (file)
@@ -30,9 +30,9 @@ typedef struct arm_jtag_s
 {
        jtag_tap_t *tap;
        
-       int scann_size;
+       u32 scann_size;
        u32 scann_instr;
-       int cur_scan_chain;
+       u32 cur_scan_chain;
        
        u32 intest_instr;
 } arm_jtag_t;
index 99f93bdeb323233ee802809e20973203ffe18f9b..4a7fd7a4ba2e9db60bdc0b1a42427e4e69153004 100644 (file)
@@ -231,7 +231,7 @@ int armv4_5_set_core_reg(reg_t *reg, u8 *buf)
                        }
                }
 
-               if (armv4_5_target->core_mode != (value & 0x1f))
+               if (armv4_5_target->core_mode != (enum armv4_5_mode)(value & 0x1f))
                {
                        LOG_DEBUG("changing ARM core mode to '%s'", armv4_5_mode_strings[armv4_5_mode_to_number(value & 0x1f)]);
                        armv4_5_target->core_mode = value & 0x1f;
index f69f9096aedcf4ef720adac7d0422cf953511241..1bf6929769718a398267142054a9840f9d640440 100644 (file)
@@ -591,7 +591,7 @@ int armv7m_checksum_memory(struct target_s *target, u32 address, u32 count, u32*
                0x1DB7, 0x04C1                  /* CRC32XOR:    .word 0x04C11DB7 */
        };
 
-       int i;
+       u32 i;
 
        if (target_alloc_working_area(target, sizeof(cortex_m3_crc_code), &crc_algorithm) != ERROR_OK)
        {
@@ -640,7 +640,7 @@ int armv7m_blank_check_memory(struct target_s *target, u32 address, u32 count, u
        reg_param_t reg_params[3];
        armv7m_algorithm_t armv7m_info;
        int retval;
-       int i;
+       u32 i;
 
        u16 erase_check_code[] =
        {
index e97b2be89a7d2bba395c8c1109d7d0a1256c57e6..f07bef0816f21c203021e6aec677b2ec91e71e8d 100644 (file)
@@ -1475,7 +1475,7 @@ int cortex_m3_target_request_data(target_t *target, u32 size, u8 *buffer)
        swjdp_common_t *swjdp = &cortex_m3->swjdp_info;
        u8 data;
        u8 ctrl;
-       int i;
+       u32 i;
        
        for (i = 0; i < (size * 4); i++)
        {
index aa9e8f9aae5091c6f89eca77b37b08f5b08d46a3..6a1cf0543753d164caa1ad08c13de0525ae4bb64 100644 (file)
@@ -484,7 +484,7 @@ int embeddedice_handshake(arm_jtag_t *jtag_info, int hsbit, u32 timeout)
        u8 field1_out[1];
        u8 field2_out[1];
        int retval;
-       int hsact;
+       u32 hsact;
        struct timeval lap;
        struct timeval now;
 
@@ -544,7 +544,7 @@ int embeddedice_handshake(arm_jtag_t *jtag_info, int hsbit, u32 timeout)
 
                gettimeofday(&now, NULL);
        }
-       while ((now.tv_sec-lap.tv_sec)*1000 + (now.tv_usec-lap.tv_usec)/1000 <= timeout);
+       while ((u32)((now.tv_sec-lap.tv_sec)*1000 + (now.tv_usec-lap.tv_usec)/1000) <= timeout);
 
        return ERROR_TARGET_TIMEOUT;
 }
index 9fa1f03c3d547f3e830cc534ad174e7f1067e9a3..709bb008057ac8d686df6ec95533384184f244a0 100644 (file)
@@ -453,7 +453,7 @@ int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char
                arm7_9->etm_ctx->capture_driver_priv = etb;
 
                etb->tap  = tap;
-               etb->cur_scan_chain = -1;
+               etb->cur_scan_chain = ~0UL;
                etb->reg_cache = NULL;
                etb->ram_width = 0;
                etb->ram_depth = 0;
index a41443b8cf998c2a1bc3feac94d201d0519e8689..f5f9cf4a7a1a8c297c4fee3ae4232f390e39737a 100644 (file)
@@ -46,17 +46,17 @@ typedef struct etb_s
 {
        etm_context_t *etm_ctx;
        jtag_tap_t *tap;
-       int cur_scan_chain;
+       u32 cur_scan_chain;
        reg_cache_t *reg_cache;
        
        /* ETB parameters */
-       int ram_depth;
-       int ram_width;
+       u32 ram_depth;
+       u32 ram_width;
 } etb_t;
 
 typedef struct etb_reg_s
 {
-       int addr;
+       u32 addr;
        etb_t *etb;
 } etb_reg_t;
 
index 2e422ee6ff270d9a7b9d7d7285e574dcbd1fc1da..06b97fe39f34dcfa6c445eca4223f1fbb474694f 100644 (file)
@@ -647,7 +647,7 @@ int etmv1_branch_address(etm_context_t *ctx)
        u8 packet;
        int shift = 0;
        int apo;
-       int i;
+       u32 i;
 
        /* quit analysis if less than two cycles are left in the trace
         * because we can't extract the APO */
@@ -998,7 +998,7 @@ int etmv1_analyze_trace(etm_context_t *ctx, struct command_context_s *cmd_ctx)
                        if (((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))
                        {
                                next_pc = instruction.info.b_bl_bx_blx.target_address;
                        }
@@ -1543,7 +1543,7 @@ int handle_etm_dump_command(struct command_context_s *cmd_ctx, char *cmd, char *
        armv4_5_common_t *armv4_5;
        arm7_9_common_t *arm7_9;
        etm_context_t *etm_ctx;
-       int i;
+       u32 i;
 
        if (argc != 1)
        {
@@ -1611,7 +1611,7 @@ int handle_etm_load_command(struct command_context_s *cmd_ctx, char *cmd, char *
        armv4_5_common_t *armv4_5;
        arm7_9_common_t *arm7_9;
        etm_context_t *etm_ctx;
-       int i;
+       u32 i;
 
        if (argc != 1)
        {
index c4fe17b277583722fa83cd5addd1d781f56a021a..8ef74c1dab6485e21b23020387dbd4fd8c9d87fa 100644 (file)
@@ -517,7 +517,7 @@ int feroceon_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buf
        arm7_9_common_t *arm7_9 = armv4_5->arch_info;
        enum armv4_5_state core_state = armv4_5->core_state;
        u32 x, flip, shift, save[7];
-       int i;
+       u32 i;
 
        /*
         * We can't use the dcc flow control bits, so let's transfer data
@@ -547,7 +547,7 @@ int feroceon_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buf
                0xeafffff3,     /*      b       3b                      */
        };
 
-       int dcc_size = sizeof(dcc_code);
+       u32 dcc_size = sizeof(dcc_code);
 
        if (!arm7_9->dcc_downloads)
                return target->type->write_memory(target, address, 4, count, buffer);
index 9ada0b4ed16a4af43bdf173f286d00173a29bc90..72035b4c16b8440d4aa42c258df8dc634ace0409 100644 (file)
@@ -47,7 +47,7 @@ typedef struct mips32_comparator_s
 
 typedef struct mips32_common_s
 {
-       int common_magic;
+       u32 common_magic;
        void *arch_info;
        reg_cache_t *core_cache;
        mips_ejtag_t ejtag_info;
index cbd30f98cccd2a05656619d40c49e61d66ab46d0..df6fc23a49ddbc8908fc8c157cc1f055f2610578 100644 (file)
@@ -40,7 +40,7 @@ int mips_ejtag_set_instr(mips_ejtag_t *ejtag_info, int new_instr, in_handler_t h
        if (tap==NULL)
                return ERROR_FAIL;
 
-       if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
+       if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != (u32)new_instr)
        {
                scan_field_t field;
                u8 t[4];
index 7c0f7ab0c5938668b848178f0d7dcdd20027acf8..55ea67caf63dcffcd77c96bdd3a637d669ab5242 100644 (file)
@@ -78,7 +78,8 @@ int oocd_trace_write_reg(oocd_trace_t *oocd_trace, int reg, u32 value)
 
 int oocd_trace_read_memory(oocd_trace_t *oocd_trace, u8 *data, u32 address, u32 size)
 {
-       size_t bytes_written, bytes_read, bytes_to_read;
+       size_t bytes_written, bytes_to_read;
+       ssize_t bytes_read;
        u8 cmd;
 
        oocd_trace_write_reg(oocd_trace, OOCD_TRACE_ADDRESS, address);
@@ -188,7 +189,7 @@ int oocd_trace_read_trace(etm_context_t *etm_ctx)
        u32 first_frame = 0x0;
        u32 num_frames = 1048576;
        u8 *trace_data;
-       int i;
+       u32 i;
 
        oocd_trace_read_reg(oocd_trace, OOCD_TRACE_STATUS, &status);
        oocd_trace_read_reg(oocd_trace, OOCD_TRACE_ADDRESS, &address);
index 60ac8e5450d86a0558ae66cc15e93e95e5e3078e..f87ab9a64e91f9f3b0496c5a23e65458526dad1f 100644 (file)
@@ -40,7 +40,7 @@ typedef struct reg_s
        u8 *value;
        int dirty;
        int valid;
-       int size;
+       u32 size;
        bitfield_desc_t *bitfield_desc;
        int num_bitfields;
        void *arch_info;
index 569633b75809e806bf0bd695ce206a7f7cfbc76c..abe7d46eeac501d8262943345e53b9ce4b6e573c 100644 (file)
@@ -985,7 +985,7 @@ int target_write_buffer(struct target_s *target, u32 address, u32 size, u8 *buff
        /* handle unaligned head bytes */
        if (address % 4)
        {
-               int unaligned = 4 - (address % 4);
+               u32 unaligned = 4 - (address % 4);
 
                if (unaligned > size)
                        unaligned = size;
@@ -1060,7 +1060,7 @@ int target_read_buffer(struct target_s *target, u32 address, u32 size, u8 *buffe
        /* handle unaligned head bytes */
        if (address % 4)
        {
-               int unaligned = 4 - (address % 4);
+               u32 unaligned = 4 - (address % 4);
 
                if (unaligned > size)
                        unaligned = size;
@@ -1100,7 +1100,7 @@ int target_checksum_memory(struct target_s *target, u32 address, u32 size, u32*
 {
        u8 *buffer;
        int retval;
-       int i;
+       u32 i;
        u32 checksum = 0;
        if (!target->type->examined)
        {
@@ -2273,7 +2273,7 @@ int handle_verify_image_command_internal(struct command_context_s *cmd_ctx, char
                                retval = target->type->read_memory(target, image.sections[i].base_address, size, count, data);
                                if (retval == ERROR_OK)
                                {
-                                       int t;
+                                       u32 t;
                                        for (t = 0; t < buf_cnt; t++)
                                        {
                                                if (data[t] != buffer[t])
@@ -2508,9 +2508,9 @@ static void writeString(FILE *f, char *s)
 }
 
 /* Dump a gmon.out histogram file. */
-static void writeGmon(u32 *samples, int sampleNum, char *filename)
+static void writeGmon(u32 *samples, u32 sampleNum, char *filename)
 {
-       int i;
+       u32 i;
        FILE *f=fopen(filename, "w");
        if (f==NULL)
                return;
@@ -2539,8 +2539,8 @@ static void writeGmon(u32 *samples, int sampleNum, char *filename)
 
        int addressSpace=(max-min+1);
 
-       static int const maxBuckets=256*1024; /* maximum buckets. */
-       int length=addressSpace;
+       static const u32 maxBuckets = 256 * 1024; /* maximum buckets. */
+       u32 length = addressSpace;
        if (length > maxBuckets)
        {
                length=maxBuckets;
@@ -2747,7 +2747,8 @@ static int target_mem2array(Jim_Interp *interp, target_t *target, int argc, Jim_
        u32 v;
        const char *varname;
        u8 buffer[4096];
-       int  i, n, e, retval;
+       int  n, e, retval;
+       u32 i;
 
        /* argv[1] = name of array to receive the data
         * argv[2] = desired width
@@ -2928,7 +2929,8 @@ static int target_array2mem(Jim_Interp *interp, target_t *target, int argc, Jim_
        u32 v;
        const char *varname;
        u8 buffer[4096];
-       int  i, n, e, retval;
+       int  n, e, retval;
+       u32 i;
 
        /* argv[1] = name of array to get the data
         * argv[2] = desired width
@@ -3200,7 +3202,7 @@ static int target_configure( Jim_GetOptInfo *goi, target_t *target )
                                teap = target->event_action;
                                /* replace existing? */
                                while( teap ){
-                                       if( teap->event == n->value ){
+                                       if( teap->event == (enum target_event)n->value ){
                                                break;
                                        }
                                        teap = teap->next;
index 9c8551f52c854c9eac87f3727dcd68ed128a7e46..1aa7d3983528d2aff69e62c8159e881d08d7094e 100644 (file)
@@ -73,7 +73,7 @@ int target_hexmsg(target_t *target, int size, u32 length)
        char line[128];
        int line_len;
        debug_msg_receiver_t *c = target->dbgmsg;
-       int i;
+       u32 i;
        
        LOG_DEBUG("size: %i, length: %i", size, length);
 
index 93925cd1a4827e5a2eba46b95adaf133f932fd7a..a9045c25eabd9f7350a74454c6f393cc2ba5ba06 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h>
 #include <inttypes.h>
 
-int trace_point(target_t *target, int number)
+int trace_point(target_t *target, u32 number)
 {
        trace_t *trace = target->trace_info;
 
@@ -60,7 +60,7 @@ int handle_trace_point_command(struct command_context_s *cmd_ctx, char *cmd, cha
        
        if (argc == 0)
        {
-               int i;
+               u32 i;
                
                for (i = 0; i < trace->num_trace_points; i++)
                {
@@ -125,9 +125,9 @@ int handle_trace_history_command(struct command_context_s *cmd_ctx, char *cmd, c
        }
        else
        {
-               int i;
-               int first = 0;
-               int last = trace->trace_history_pos;
+               u32 i;
+               u32 first = 0;
+               u32 last = trace->trace_history_pos;
 
                if ( !trace->trace_history_size ) {
                        command_print(cmd_ctx, "trace history buffer is not allocated");
index f7d9e5b1a7667d040ae93289eec36813f0bf7a27..f0e92f94b0deafb0672077e5a910e1bc30f912fc 100644 (file)
@@ -32,12 +32,12 @@ typedef struct trace_point_s
 
 typedef struct trace_s
 {
-       int num_trace_points;
-       int trace_points_size;
+       u32 num_trace_points;
+       u32 trace_points_size;
        trace_point_t *trace_points;
-       int trace_history_size;
+       u32 trace_history_size;
        u32 *trace_history;
-       int trace_history_pos;
+       u32 trace_history_pos;
        int trace_history_overflowed;
 } trace_t;
 
@@ -50,7 +50,7 @@ typedef enum trace_status
        TRACE_OVERFLOWED = 0x8,
 } trace_status_t;
 
-extern int trace_point(struct target_s *target, int number);
+extern int trace_point(struct target_s *target, u32 number);
 extern int trace_register_commands(struct command_context_s *cmd_ctx);
 
 #define ERROR_TRACE_IMAGE_UNAVAILABLE          -(1500)
index 007bdbd65ce8e61dd708ec4eaa3e8a2faa2ccdc0..c3b8d3358822724130cb2109759da7be57c2021f 100644 (file)
@@ -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;
                                        }
index eea5ff16d995353a19105d9401b1f3f783cb69ee..4e1f23e069310f2a5e9c91bbab431e2ca957bb0a 100644 (file)
@@ -743,7 +743,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
 
                case XCOMMENT:
                        {
-                               int             ndx = 0;
+                               unsigned int ndx = 0;
                                char    comment[128];
 
                                do

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)