diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-18 11:09:46 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-18 11:09:46 +0200 |
commit | aa948c76a30cad648998fa7c70e0cf4691659de4 (patch) | |
tree | 45a500757c00c575331b03969b2639110d30d2e4 /src | |
parent | 885e0d93742e647ae58964a1d2cebcaaaaccd609 (diff) | |
download | weechat-aa948c76a30cad648998fa7c70e0cf4691659de4.zip |
core: remove some compilation warnings under Cygwin
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-command.c | 4 | ||||
-rw-r--r-- | src/core/wee-string.c | 4 | ||||
-rw-r--r-- | src/core/wee-util.c | 2 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 2 | ||||
-rw-r--r-- | src/gui/gui-chat.c | 4 | ||||
-rw-r--r-- | src/gui/gui-nicklist.c | 2 | ||||
-rw-r--r-- | src/gui/gui-window.c | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 9 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 2 | ||||
-rw-r--r-- | src/plugins/logger/logger.c | 2 | ||||
-rw-r--r-- | src/plugins/relay/relay-server.c | 2 |
11 files changed, 16 insertions, 21 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 81246bb3c..4c093f2b7 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -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++; } diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 6d1270221..06695b290 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -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]); diff --git a/src/core/wee-util.c b/src/core/wee-util.c index b01f6d922..1346d1798 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -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++; diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 0a34f5446..5738e0594 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -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++; diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index 3f7b2c123..973aee7df 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -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) { diff --git a/src/gui/gui-nicklist.c b/src/gui/gui-nicklist.c index ce3c332aa..a9a1eff2f 100644 --- a/src/gui/gui-nicklist.c +++ b/src/gui/gui-nicklist.c @@ -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; diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index f16597d34..5d0c0eb14 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -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++; } diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index be71e7033..301276e79 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -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]) { diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index b21a10a25..61dc789fb 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -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++; } diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c index c39fc7073..f722114bb 100644 --- a/src/plugins/logger/logger.c +++ b/src/plugins/logger/logger.c @@ -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'); } diff --git a/src/plugins/relay/relay-server.c b/src/plugins/relay/relay-server.c index 2a25b6a2f..b1a39138d 100644 --- a/src/plugins/relay/relay-server.c +++ b/src/plugins/relay/relay-server.c @@ -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; |