Zach Welch <zw@superlucidity.net> fix -Wformat-security warnings (1 of 4)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1481 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -54,7 +54,7 @@ static struct option long_options[] =
|
|||||||
|
|
||||||
int configuration_output_handler(struct command_context_s *context, const char* line)
|
int configuration_output_handler(struct command_context_s *context, const char* line)
|
||||||
{
|
{
|
||||||
LOG_USER_N(line);
|
LOG_USER_N("%s", line);
|
||||||
|
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -896,7 +896,7 @@ static void armjtagew_debug_buffer(u8 *buffer, int length)
|
|||||||
snprintf(s, 4, " %02x", buffer[j]);
|
snprintf(s, 4, " %02x", buffer[j]);
|
||||||
strcat(line, s);
|
strcat(line, s);
|
||||||
}
|
}
|
||||||
LOG_DEBUG(line);
|
LOG_DEBUG("%s", line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ static int jlink_get_version_info(void)
|
|||||||
if (result == len)
|
if (result == len)
|
||||||
{
|
{
|
||||||
usb_in_buffer[result] = 0;
|
usb_in_buffer[result] = 0;
|
||||||
LOG_INFO((char *)usb_in_buffer);
|
LOG_INFO("%s", (char *)usb_in_buffer);
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ static int vsllink_init(void)
|
|||||||
vsllink_usb_in_buffer[result] = 0;
|
vsllink_usb_in_buffer[result] = 0;
|
||||||
VSLLINK_BufferSize = vsllink_usb_in_buffer[0] + (vsllink_usb_in_buffer[1] << 8);
|
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));
|
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 the pre-alloc memroy
|
||||||
free(vsllink_usb_in_buffer);
|
free(vsllink_usb_in_buffer);
|
||||||
@@ -1449,7 +1449,7 @@ static void vsllink_debug_buffer(u8 *buffer, int length)
|
|||||||
snprintf(s, 4, " %02x", buffer[j]);
|
snprintf(s, 4, " %02x", buffer[j]);
|
||||||
strcat(line, s);
|
strcat(line, s);
|
||||||
}
|
}
|
||||||
LOG_DEBUG(line);
|
LOG_DEBUG("%s", line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // _DEBUG_USB_COMMS_
|
#endif // _DEBUG_USB_COMMS_
|
||||||
|
|||||||
@@ -3961,7 +3961,7 @@ static int jim_target( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
|
|||||||
};
|
};
|
||||||
|
|
||||||
LOG_DEBUG("Target command params:");
|
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" );
|
cmd_ctx = Jim_GetAssocData( interp, "context" );
|
||||||
|
|
||||||
|
|||||||
@@ -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 */
|
comment[sizeof(comment)-1] = 0; /* regardless, terminate */
|
||||||
if (verbose)
|
if (verbose)
|
||||||
LOG_USER(comment);
|
LOG_USER("%s", comment);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user