summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f9d203d)
It's less accepting of signed char ... insisting that e.g. tolower()
not receive one as a parameter.
It's probably good to phase out such usage, given the number of bugs
that lurk in the vicinity (assumptions that char is unsigned), so fix
these even though such usage is actually legal.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
char *str;
mflash_bank->rst_pin.num = strtoul(CMD_ARGV[2], &str, 0);
if (*str)
char *str;
mflash_bank->rst_pin.num = strtoul(CMD_ARGV[2], &str, 0);
if (*str)
- mflash_bank->rst_pin.port[0] = (uint16_t)tolower(str[0]);
+ mflash_bank->rst_pin.port[0] = (uint16_t)
+ tolower((unsigned)str[0]);
mflash_bank->target = target;
mflash_bank->target = target;
memcpy(buf, strObjPtr->bytes, strObjPtr->length + 1);
for (i = 0; i < strObjPtr->length; i++)
memcpy(buf, strObjPtr->bytes, strObjPtr->length + 1);
for (i = 0; i < strObjPtr->length; i++)
- buf[i] = tolower(buf[i]);
+ buf[i] = tolower((unsigned)buf[i]);
return Jim_NewStringObjNoAlloc(interp, buf, strObjPtr->length);
}
return Jim_NewStringObjNoAlloc(interp, buf, strObjPtr->length);
}
memcpy(buf, strObjPtr->bytes, strObjPtr->length + 1);
for (i = 0; i < strObjPtr->length; i++)
memcpy(buf, strObjPtr->bytes, strObjPtr->length + 1);
for (i = 0; i < strObjPtr->length; i++)
- buf[i] = toupper(buf[i]);
+ buf[i] = toupper((unsigned)buf[i]);
return Jim_NewStringObjNoAlloc(interp, buf, strObjPtr->length);
}
return Jim_NewStringObjNoAlloc(interp, buf, strObjPtr->length);
}
case '8':
case '9':
accum = 0;
case '8':
case '9':
accum = 0;
- while (isdigit(*fmt) && (fmtLen > 0)) {
+ while (isdigit((unsigned)*fmt) && (fmtLen > 0)) {
accum = (accum * 10) + (*fmt - '0');
fmt++; fmtLen--;
}
accum = (accum * 10) + (*fmt - '0');
fmt++; fmtLen--;
}
-static int hextoint(char c)
+static int hextoint(int c)
const char *result;
int reslen;
struct tcl_connection *tclc;
const char *result;
int reslen;
struct tcl_connection *tclc;
rlen = read_socket(connection->fd, &in, sizeof(in));
if (rlen <= 0) {
rlen = read_socket(connection->fd, &in, sizeof(in));
if (rlen <= 0) {
int telnet_input(struct connection *connection)
{
int bytes_read;
int telnet_input(struct connection *connection)
{
int bytes_read;
- char buffer[TELNET_BUFFER_SIZE];
- char *buf_p;
+ unsigned char buffer[TELNET_BUFFER_SIZE];
+ unsigned char *buf_p;
struct telnet_connection *t_con = connection->priv;
struct command_context *command_context = connection->cmd_ctx;
struct telnet_connection *t_con = connection->priv;
struct command_context *command_context = connection->cmd_ctx;
switch (t_con->state)
{
case TELNET_STATE_DATA:
switch (t_con->state)
{
case TELNET_STATE_DATA:
{
t_con->state = TELNET_STATE_IAC;
}
{
t_con->state = TELNET_STATE_IAC;
}
case TELNET_STATE_IAC:
switch (*buf_p)
{
case TELNET_STATE_IAC:
switch (*buf_p)
{
t_con->state = TELNET_STATE_DONT;
break;
t_con->state = TELNET_STATE_DONT;
break;
t_con->state = TELNET_STATE_DO;
break;
t_con->state = TELNET_STATE_DO;
break;
t_con->state = TELNET_STATE_WONT;
break;
t_con->state = TELNET_STATE_WONT;
break;
t_con->state = TELNET_STATE_WILL;
break;
}
t_con->state = TELNET_STATE_WILL;
break;
}
#define SVFP_CMD_INC_CNT 1024
static int svf_read_command_from_file(int fd)
{
#define SVFP_CMD_INC_CNT 1024
static int svf_read_command_from_file(int fd)
{
- char ch, *tmp_buffer = NULL;
+ unsigned char ch;
+ char *tmp_buffer = NULL;
int cmd_pos = 0, cmd_ok = 0, slash = 0, comment = 0;
while (!cmd_ok && (read(fd, &ch, 1) > 0))
int cmd_pos = 0, cmd_ok = 0, slash = 0, comment = 0;
while (!cmd_ok && (read(fd, &ch, 1) > 0))