]> git.sur5r.net Git - openocd/commitdiff
Zach Welch <zw@superlucidity.net> fix -Wformat-security warnings (1 of 4)
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 21 Apr 2009 05:33:47 +0000 (05:33 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 21 Apr 2009 05:33:47 +0000 (05:33 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1481 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/options.c
src/jtag/arm-jtag-ew.c
src/jtag/jlink.c
src/jtag/vsllink.c
src/target/target.c
src/xsvf/xsvf.c

index 7e738d734042219b7d166536b3012b1bf5926dcd..109419b39a9188fb0eda254ad51e0ec7de82b449 100644 (file)
@@ -54,7 +54,7 @@ static struct option long_options[] =
 
 int configuration_output_handler(struct command_context_s *context, const char* line)
 {
-       LOG_USER_N(line);
+       LOG_USER_N("%s", line);
 
        return ERROR_OK;
 }
index fa2df65a53063c2862eb427a5e565fbf59ab047b..4acea8d600c04053dcbd6bf74913b36a5e32bd47 100644 (file)
@@ -896,7 +896,7 @@ static void armjtagew_debug_buffer(u8 *buffer, int length)
                        snprintf(s, 4, " %02x", buffer[j]);
                        strcat(line, s);
                }
-               LOG_DEBUG(line);
+               LOG_DEBUG("%s", line);
        }
 }
 #endif
index 7eae9049deab563d2c73ef2b9906e9ba9307b29c..9b5a6954a3564614fcbb1ad781f3cc9c2fdcc09f 100644 (file)
@@ -537,7 +537,7 @@ static int jlink_get_version_info(void)
                if (result == len)
                {
                        usb_in_buffer[result] = 0;
-                       LOG_INFO((char *)usb_in_buffer);
+                       LOG_INFO("%s", (char *)usb_in_buffer);
                        return ERROR_OK;
                }
        }
index 7e9bbc1f02aefd57ea3dbf9c89cc05e815d34f3b..02d4e64ee39a2ed6ce3bfb8ca461b85bbabe636f 100644 (file)
@@ -470,7 +470,7 @@ static int vsllink_init(void)
                        vsllink_usb_in_buffer[result] = 0;
                        VSLLINK_BufferSize = vsllink_usb_in_buffer[0] + (vsllink_usb_in_buffer[1] << 8);
                        strncpy(version_str, (char *)vsllink_usb_in_buffer + 2, sizeof(version_str));
-                       LOG_INFO(version_str);
+                       LOG_INFO("%s", version_str);
 
                        // free the pre-alloc memroy
                        free(vsllink_usb_in_buffer);
@@ -1449,7 +1449,7 @@ static void vsllink_debug_buffer(u8 *buffer, int length)
                        snprintf(s, 4, " %02x", buffer[j]);
                        strcat(line, s);
                }
-               LOG_DEBUG(line);
+               LOG_DEBUG("%s", line);
        }
 }
 #endif // _DEBUG_USB_COMMS_
index abe7d46eeac501d8262943345e53b9ce4b6e573c..40a2dc93ff46aabd44ddb1522fe3d52e45de8aae 100644 (file)
@@ -3961,7 +3961,7 @@ static int jim_target( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
        };
 
        LOG_DEBUG("Target command params:");
-       LOG_DEBUG(Jim_Debug_ArgvString( interp, argc, argv) );
+       LOG_DEBUG("%s", Jim_Debug_ArgvString(interp, argc, argv));
 
        cmd_ctx = Jim_GetAssocData( interp, "context" );
 
index 4e1f23e069310f2a5e9c91bbab431e2ca957bb0a..3613897f448696459d88b64cc8af44f9ba18d72f 100644 (file)
@@ -761,7 +761,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
 
                                comment[sizeof(comment)-1] = 0;         /* regardless, terminate */
                                if (verbose)
-                                       LOG_USER(comment);
+                                       LOG_USER("%s", comment);
                        }
                        break;