From: <oh...@ma...> - 2009-04-21 07:33:54
|
Author: oharboe Date: 2009-04-21 07:33:47 +0200 (Tue, 21 Apr 2009) New Revision: 1481 Modified: trunk/src/helper/options.c trunk/src/jtag/arm-jtag-ew.c trunk/src/jtag/jlink.c trunk/src/jtag/vsllink.c trunk/src/target/target.c trunk/src/xsvf/xsvf.c Log: Zach Welch <zw...@su...> fix -Wformat-security warnings (1 of 4) Modified: trunk/src/helper/options.c =================================================================== --- trunk/src/helper/options.c 2009-04-21 05:31:18 UTC (rev 1480) +++ trunk/src/helper/options.c 2009-04-21 05:33:47 UTC (rev 1481) @@ -54,7 +54,7 @@ int configuration_output_handler(struct command_context_s *context, const char* line) { - LOG_USER_N(line); + LOG_USER_N("%s", line); return ERROR_OK; } Modified: trunk/src/jtag/arm-jtag-ew.c =================================================================== --- trunk/src/jtag/arm-jtag-ew.c 2009-04-21 05:31:18 UTC (rev 1480) +++ trunk/src/jtag/arm-jtag-ew.c 2009-04-21 05:33:47 UTC (rev 1481) @@ -896,7 +896,7 @@ snprintf(s, 4, " %02x", buffer[j]); strcat(line, s); } - LOG_DEBUG(line); + LOG_DEBUG("%s", line); } } #endif Modified: trunk/src/jtag/jlink.c =================================================================== --- trunk/src/jtag/jlink.c 2009-04-21 05:31:18 UTC (rev 1480) +++ trunk/src/jtag/jlink.c 2009-04-21 05:33:47 UTC (rev 1481) @@ -537,7 +537,7 @@ if (result == len) { usb_in_buffer[result] = 0; - LOG_INFO((char *)usb_in_buffer); + LOG_INFO("%s", (char *)usb_in_buffer); return ERROR_OK; } } Modified: trunk/src/jtag/vsllink.c =================================================================== --- trunk/src/jtag/vsllink.c 2009-04-21 05:31:18 UTC (rev 1480) +++ trunk/src/jtag/vsllink.c 2009-04-21 05:33:47 UTC (rev 1481) @@ -470,7 +470,7 @@ 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 @@ snprintf(s, 4, " %02x", buffer[j]); strcat(line, s); } - LOG_DEBUG(line); + LOG_DEBUG("%s", line); } } #endif // _DEBUG_USB_COMMS_ Modified: trunk/src/target/target.c =================================================================== --- trunk/src/target/target.c 2009-04-21 05:31:18 UTC (rev 1480) +++ trunk/src/target/target.c 2009-04-21 05:33:47 UTC (rev 1481) @@ -3961,7 +3961,7 @@ }; 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" ); Modified: trunk/src/xsvf/xsvf.c =================================================================== --- trunk/src/xsvf/xsvf.c 2009-04-21 05:31:18 UTC (rev 1480) +++ trunk/src/xsvf/xsvf.c 2009-04-21 05:33:47 UTC (rev 1481) @@ -761,7 +761,7 @@ comment[sizeof(comment)-1] = 0; /* regardless, terminate */ if (verbose) - LOG_USER(comment); + LOG_USER("%s", comment); } break; |