Hi all,

Cygwin is giving me some compile warnings (and stops compiling on these warnings). I have made a patch for these warnings (see attached file: cycgwin_warnings.patch) An other warning is about a variable, which could be uninitialized in this function. I also created a path for this one, but I'm not sure it is the correct way to solve this problem. (see attached file: uninitialized_warnings.patch)

Cheers,

Ferdinand
Index: src/svf/svf.c
===================================================================
--- src/svf/svf.c       (revision 2606)
+++ src/svf/svf.c       (working copy)
@@ -656,7 +656,7 @@
 static int svf_copy_hexstring_to_binary(char *str, uint8_t **bin, int 
orig_bit_len, int bit_len)
 {
        int i, str_len = strlen(str), str_hbyte_len = (bit_len + 3) >> 2;
-       uint8_t ch;
+       uint8_t ch=0;
 
        if (ERROR_OK != svf_adjust_array_length(bin, orig_bit_len, bit_len))
        {
Index: src/target/target.c
===================================================================
--- src/target/target.c (revision 2606)
+++ src/target/target.c (working copy)
@@ -1760,7 +1760,7 @@
                                        value = buf_to_str(reg->value,
                                                        reg->size, 16);
                                        command_print(cmd_ctx,
-                                                       "(%i) %s (/%u): 0x%s%s",
+                                                       "(%i) %s (/%" PRIu32 
"): 0x%s%s",
                                                        count, reg->name,
                                                        reg->size, value,
                                                        reg->dirty
@@ -1768,7 +1768,7 @@
                                                                : "");
                                        free(value);
                                } else {
-                                       command_print(cmd_ctx, "(%i) %s (/%u)",
+                                       command_print(cmd_ctx, "(%i) %s (/%" 
PRIu32 ")",
                                                          count, reg->name,
                                                          reg->size) ;
                                }
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to