openocd: convert 'unsigned' to 'unsigned int'
Conversion done with checkpatch --fix-inplace -types UNSPECIFIED_INT Ignore the cast as they could be better addressed. Fix only minor additional checkpatch issue (spacing and line length). Change-Id: I4f936ffc4cedb153afa331cd293b08f4c913dc93 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8482 Tested-by: jenkins
This commit is contained in:
@@ -58,7 +58,7 @@ void *jimcmd_privdata(Jim_Cmd *cmd)
|
||||
return cmd->isproc ? NULL : cmd->u.native.privData;
|
||||
}
|
||||
|
||||
static void tcl_output(void *privData, const char *file, unsigned line,
|
||||
static void tcl_output(void *privData, const char *file, unsigned int line,
|
||||
const char *function, const char *string)
|
||||
{
|
||||
struct log_capture_state *state = privData;
|
||||
@@ -144,7 +144,7 @@ static void script_debug(Jim_Interp *interp, unsigned int argc, Jim_Obj * const
|
||||
return;
|
||||
|
||||
char *dbg = alloc_printf("command -");
|
||||
for (unsigned i = 0; i < argc; i++) {
|
||||
for (unsigned int i = 0; i < argc; i++) {
|
||||
const char *w = Jim_GetString(argv[i], NULL);
|
||||
char *t = alloc_printf("%s %s", dbg, w);
|
||||
free(dbg);
|
||||
@@ -288,7 +288,7 @@ int __register_commands(struct command_context *cmd_ctx, const char *cmd_prefix,
|
||||
struct target *override_target)
|
||||
{
|
||||
int retval = ERROR_OK;
|
||||
unsigned i;
|
||||
unsigned int i;
|
||||
for (i = 0; cmds[i].name || cmds[i].chain; i++) {
|
||||
const struct command_registration *cr = cmds + i;
|
||||
|
||||
@@ -323,7 +323,7 @@ int __register_commands(struct command_context *cmd_ctx, const char *cmd_prefix,
|
||||
}
|
||||
}
|
||||
if (retval != ERROR_OK) {
|
||||
for (unsigned j = 0; j < i; j++)
|
||||
for (unsigned int j = 0; j < i; j++)
|
||||
unregister_command(cmd_ctx, cmd_prefix, cmds[j].name);
|
||||
}
|
||||
return retval;
|
||||
@@ -728,12 +728,12 @@ static COMMAND_HELPER(command_help_show_list, bool show_help, const char *cmd_ma
|
||||
|
||||
#define HELP_LINE_WIDTH(_n) (int)(76 - (2 * _n))
|
||||
|
||||
static void command_help_show_indent(unsigned n)
|
||||
static void command_help_show_indent(unsigned int n)
|
||||
{
|
||||
for (unsigned i = 0; i < n; i++)
|
||||
for (unsigned int i = 0; i < n; i++)
|
||||
LOG_USER_N(" ");
|
||||
}
|
||||
static void command_help_show_wrap(const char *str, unsigned n, unsigned n2)
|
||||
static void command_help_show_wrap(const char *str, unsigned int n, unsigned int n2)
|
||||
{
|
||||
const char *cp = str, *last = str;
|
||||
while (*cp) {
|
||||
@@ -1317,7 +1317,7 @@ DEFINE_PARSE_NUM_TYPE(_llong, long long, strtoll, LLONG_MIN, LLONG_MAX)
|
||||
|
||||
#define DEFINE_PARSE_ULONGLONG(name, type, min, max) \
|
||||
DEFINE_PARSE_WRAPPER(name, type, min, max, unsigned long long, _ullong)
|
||||
DEFINE_PARSE_ULONGLONG(_uint, unsigned, 0, UINT_MAX)
|
||||
DEFINE_PARSE_ULONGLONG(_uint, unsigned int, 0, UINT_MAX)
|
||||
DEFINE_PARSE_ULONGLONG(_u64, uint64_t, 0, UINT64_MAX)
|
||||
DEFINE_PARSE_ULONGLONG(_u32, uint32_t, 0, UINT32_MAX)
|
||||
DEFINE_PARSE_ULONGLONG(_u16, uint16_t, 0, UINT16_MAX)
|
||||
|
||||
Reference in New Issue
Block a user