1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 11:43:13 +02:00

core: remove some compilation warnings under Cygwin

This commit is contained in:
Sebastien Helleu
2011-08-18 11:09:46 +02:00
parent 885e0d9374
commit aa948c76a3
11 changed files with 16 additions and 21 deletions
+2 -2
View File
@@ -701,7 +701,7 @@ COMMAND_CALLBACK(buffer)
}
else
{
if (isdigit (argv_eol[2][0]))
if (isdigit ((unsigned char)argv_eol[2][0]))
{
number1 = -1;
number2 = -1;
@@ -4799,7 +4799,7 @@ COMMAND_CALLBACK(wait)
if (argc > 2)
{
pos = argv[1];
while (pos[0] && isdigit (pos[0]))
while (pos[0] && isdigit ((unsigned char)pos[0]))
{
pos++;
}
+2 -2
View File
@@ -541,8 +541,8 @@ string_convert_hex_chars (const char *string)
break;
case 'x':
case 'X':
if (isxdigit (string[1])
&& isxdigit (string[2]))
if (isxdigit ((unsigned char)string[1])
&& isxdigit ((unsigned char)string[2]))
{
snprintf (hex_str, sizeof (hex_str),
"0x%c%c", string[1], string[2]);
+1 -1
View File
@@ -422,7 +422,7 @@ util_version_number (const char *version)
{
if (ptr_item[0] == '-')
break;
if (isdigit (ptr_item[0]))
if (isdigit ((unsigned char)ptr_item[0]))
{
buf[index_buf] = ptr_item[0];
index_buf++;
+1 -1
View File
@@ -627,7 +627,7 @@ gui_buffer_string_replace_local_var (struct t_gui_buffer *buffer,
pos_end_name = string + index_string + 1;
while (pos_end_name[0])
{
if (isalnum (pos_end_name[0])
if (isalnum ((unsigned char)pos_end_name[0])
&& (pos_end_name[0] != '_')
&& (pos_end_name[0] != '$'))
pos_end_name++;
+2 -2
View File
@@ -355,7 +355,7 @@ gui_chat_get_time_string (time_t date)
i = 0;
while (text_time[i])
{
if (isdigit (text_time[i]))
if (isdigit ((unsigned char)text_time[i]))
{
if (time_first_digit == -1)
time_first_digit = i;
@@ -393,7 +393,7 @@ gui_chat_get_time_string (time_t date)
}
else
{
if (isdigit (text_time[i]))
if (isdigit ((unsigned char)text_time[i]))
{
if (last_color != GUI_COLOR_CHAT_TIME)
{
+1 -1
View File
@@ -615,7 +615,7 @@ gui_nicklist_get_group_start (const char *name)
const char *ptr_name;
ptr_name = name;
while (isdigit (ptr_name[0]))
while (isdigit ((unsigned char)ptr_name[0]))
{
if (ptr_name[0] == '|')
break;
+2 -2
View File
@@ -1048,7 +1048,7 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
/* search number and letter */
pos = scroll;
while (pos && pos[0] && isdigit (pos[0]))
while (pos && pos[0] && isdigit ((unsigned char)pos[0]))
{
pos++;
}
@@ -1275,7 +1275,7 @@ gui_window_scroll_horiz (struct t_gui_window *window, char *scroll)
/* search number and percentage */
pos = scroll;
while (pos && pos[0] && isdigit (pos[0]))
while (pos && pos[0] && isdigit ((unsigned char)pos[0]))
{
pos++;
}
+2 -7
View File
@@ -866,7 +866,7 @@ int
irc_command_ctcp (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
char *pos, *irc_cmd, str_time[512];
char *irc_cmd, str_time[512];
struct timeval tv;
IRC_BUFFER_GET_SERVER(buffer);
@@ -881,12 +881,7 @@ irc_command_ctcp (void *data, struct t_gui_buffer *buffer, int argc,
if (!irc_cmd)
return WEECHAT_RC_ERROR;
pos = irc_cmd;
while (pos[0])
{
pos[0] = toupper (pos[0]);
pos++;
}
weechat_string_toupper (irc_cmd);
if ((weechat_strcasecmp (argv[2], "ping") == 0) && !argv_eol[3])
{
+1 -1
View File
@@ -61,7 +61,7 @@ irc_protocol_is_numeric_command (const char *str)
{
while (str && str[0])
{
if (!isdigit (str[0]))
if (!isdigit ((unsigned char)str[0]))
return 0;
str++;
}
+1 -1
View File
@@ -1148,7 +1148,7 @@ logger_line_log_level (int tags_count, const char **tags)
/* log level for line? return it */
if (strncmp (tags[i], "log", 3) == 0)
{
if (isdigit (tags[i][3]))
if (isdigit ((unsigned char)tags[i][3]))
{
return (tags[i][3] - '0');
}
+1 -1
View File
@@ -164,7 +164,7 @@ relay_server_sock_cb (void *data, int fd)
{
struct t_relay_server *server;
struct sockaddr_in client_addr;
unsigned int client_length;
socklen_t client_length;
int client_fd;
char ipv4_address[INET_ADDRSTRLEN + 1], *ptr_address;