mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-15 10:07:39 -05:00
Fix an assortment of dupprintf() format string bugs.
I've enabled gcc's format-string checking on dupprintf, by declaring it in misc.h to have the appropriate GNU-specific attribute. This pointed out a selection of warnings, which I've fixed. [originally from svn r10084]
This commit is contained in:
@ -275,7 +275,7 @@ int cmdline_process_param(char *p, char *value, int need_save, Conf *conf)
|
||||
return ret;
|
||||
}
|
||||
|
||||
key = dupprintf("%c%.*s", type, q - value, value);
|
||||
key = dupprintf("%c%.*s", type, (int)(q - value), value);
|
||||
val = dupstr(q+1);
|
||||
} else {
|
||||
/*
|
||||
@ -307,7 +307,7 @@ int cmdline_process_param(char *p, char *value, int need_save, Conf *conf)
|
||||
return ret;
|
||||
}
|
||||
|
||||
host = dupprintf("%.*s", portp - value, value);
|
||||
host = dupprintf("%.*s", (int)(portp - value), value);
|
||||
conf_set_str(conf, CONF_ssh_nc_host, host);
|
||||
conf_set_int(conf, CONF_ssh_nc_port, atoi(portp + 1));
|
||||
sfree(host);
|
||||
|
Reference in New Issue
Block a user