mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 11:26:21 +00:00
cleanup: Adapt loop counter to proper type
Fixing a couple of -Wsign-compare warnings.
This commit is contained in:
@@ -1767,7 +1767,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
|||||||
"/history", "/vercheck", "/privileges", "/wrap",
|
"/history", "/vercheck", "/privileges", "/wrap",
|
||||||
"/carbons", "/slashguard", "/mam", "/silence" };
|
"/carbons", "/slashguard", "/mam", "/silence" };
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(boolean_choices); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(boolean_choices); i++) {
|
||||||
result = autocomplete_param_with_func(input, boolean_choices[i], prefs_autocomplete_boolean_choice, previous, NULL);
|
result = autocomplete_param_with_func(input, boolean_choices[i], prefs_autocomplete_boolean_choice, previous, NULL);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
@@ -1784,7 +1784,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
|||||||
|
|
||||||
// Remove quote character before and after names when doing autocomplete
|
// Remove quote character before and after names when doing autocomplete
|
||||||
char* unquoted = strip_arg_quotes(input);
|
char* unquoted = strip_arg_quotes(input);
|
||||||
for (int i = 0; i < ARRAY_SIZE(nick_choices); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(nick_choices); i++) {
|
||||||
result = autocomplete_param_with_ac(unquoted, nick_choices[i], nick_ac, TRUE, previous);
|
result = autocomplete_param_with_ac(unquoted, nick_choices[i], nick_ac, TRUE, previous);
|
||||||
if (result) {
|
if (result) {
|
||||||
free(unquoted);
|
free(unquoted);
|
||||||
@@ -1799,7 +1799,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
|||||||
gchar* contact_choices[] = { "/msg", "/info" };
|
gchar* contact_choices[] = { "/msg", "/info" };
|
||||||
// Remove quote character before and after names when doing autocomplete
|
// Remove quote character before and after names when doing autocomplete
|
||||||
char* unquoted = strip_arg_quotes(input);
|
char* unquoted = strip_arg_quotes(input);
|
||||||
for (int i = 0; i < ARRAY_SIZE(contact_choices); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(contact_choices); i++) {
|
||||||
result = autocomplete_param_with_func(unquoted, contact_choices[i], roster_contact_autocomplete, previous, NULL);
|
result = autocomplete_param_with_func(unquoted, contact_choices[i], roster_contact_autocomplete, previous, NULL);
|
||||||
if (result) {
|
if (result) {
|
||||||
free(unquoted);
|
free(unquoted);
|
||||||
@@ -1814,7 +1814,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
|||||||
free(unquoted);
|
free(unquoted);
|
||||||
|
|
||||||
gchar* resource_choices[] = { "/caps", "/ping" };
|
gchar* resource_choices[] = { "/caps", "/ping" };
|
||||||
for (int i = 0; i < ARRAY_SIZE(resource_choices); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(resource_choices); i++) {
|
||||||
result = autocomplete_param_with_func(input, resource_choices[i], roster_fulljid_autocomplete, previous, NULL);
|
result = autocomplete_param_with_func(input, resource_choices[i], roster_fulljid_autocomplete, previous, NULL);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
@@ -1823,7 +1823,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
|||||||
}
|
}
|
||||||
|
|
||||||
gchar* invite_choices[] = { "/join" };
|
gchar* invite_choices[] = { "/join" };
|
||||||
for (int i = 0; i < ARRAY_SIZE(invite_choices); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(invite_choices); i++) {
|
||||||
result = autocomplete_param_with_func(input, invite_choices[i], muc_invites_find, previous, NULL);
|
result = autocomplete_param_with_func(input, invite_choices[i], muc_invites_find, previous, NULL);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
@@ -1843,7 +1843,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
|||||||
{ "/inputwin", winpos_ac },
|
{ "/inputwin", winpos_ac },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(ac_cmds); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(ac_cmds); i++) {
|
||||||
result = autocomplete_param_with_ac(input, ac_cmds[i].cmd, ac_cmds[i].completer, TRUE, previous);
|
result = autocomplete_param_with_ac(input, ac_cmds[i].cmd, ac_cmds[i].completer, TRUE, previous);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
@@ -1932,7 +1932,7 @@ _who_autocomplete(ProfWin* window, const char* const input, gboolean previous)
|
|||||||
"/who chat", "/who away", "/who xa", "/who dnd", "/who available",
|
"/who chat", "/who away", "/who xa", "/who dnd", "/who available",
|
||||||
"/who unavailable" };
|
"/who unavailable" };
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(group_commands); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(group_commands); i++) {
|
||||||
result = autocomplete_param_with_func(input, group_commands[i], roster_group_autocomplete, previous, NULL);
|
result = autocomplete_param_with_func(input, group_commands[i], roster_group_autocomplete, previous, NULL);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
@@ -2254,7 +2254,7 @@ _notify_autocomplete(ProfWin* window, const char* const input, gboolean previous
|
|||||||
|
|
||||||
gchar* boolean_choices1[] = { "/notify room current", "/notify chat current", "/notify typing current",
|
gchar* boolean_choices1[] = { "/notify room current", "/notify chat current", "/notify typing current",
|
||||||
"/notify room text", "/notify chat text", "/notify room offline" };
|
"/notify room text", "/notify chat text", "/notify room offline" };
|
||||||
for (int i = 0; i < ARRAY_SIZE(boolean_choices1); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(boolean_choices1); i++) {
|
||||||
result = autocomplete_param_with_func(input, boolean_choices1[i], prefs_autocomplete_boolean_choice, previous, NULL);
|
result = autocomplete_param_with_func(input, boolean_choices1[i], prefs_autocomplete_boolean_choice, previous, NULL);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
@@ -2287,7 +2287,7 @@ _notify_autocomplete(ProfWin* window, const char* const input, gboolean previous
|
|||||||
}
|
}
|
||||||
|
|
||||||
gchar* boolean_choices2[] = { "/notify invite", "/notify sub", "/notify mention", "/notify trigger" };
|
gchar* boolean_choices2[] = { "/notify invite", "/notify sub", "/notify mention", "/notify trigger" };
|
||||||
for (int i = 0; i < ARRAY_SIZE(boolean_choices2); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(boolean_choices2); i++) {
|
||||||
result = autocomplete_param_with_func(input, boolean_choices2[i], prefs_autocomplete_boolean_choice, previous, NULL);
|
result = autocomplete_param_with_func(input, boolean_choices2[i], prefs_autocomplete_boolean_choice, previous, NULL);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
@@ -3733,7 +3733,7 @@ _account_autocomplete(ProfWin* window, const char* const input, gboolean previou
|
|||||||
"/account disable", "/account rename", "/account clear", "/account remove",
|
"/account disable", "/account rename", "/account clear", "/account remove",
|
||||||
"/account default set" };
|
"/account default set" };
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(account_choice); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(account_choice); i++) {
|
||||||
found = autocomplete_param_with_func(input, account_choice[i], accounts_find_all, previous, NULL);
|
found = autocomplete_param_with_func(input, account_choice[i], accounts_find_all, previous, NULL);
|
||||||
if (found) {
|
if (found) {
|
||||||
return found;
|
return found;
|
||||||
@@ -4274,7 +4274,7 @@ _vcard_autocomplete(ProfWin* window, const char* const input, gboolean previous)
|
|||||||
gboolean is_num = TRUE;
|
gboolean is_num = TRUE;
|
||||||
|
|
||||||
if (num_args >= 2) {
|
if (num_args >= 2) {
|
||||||
for (int i = 0; i < strlen(args[1]); i++) {
|
for (size_t i = 0; i < strlen(args[1]); i++) {
|
||||||
if (!isdigit((int)args[1][i])) {
|
if (!isdigit((int)args[1][i])) {
|
||||||
is_num = FALSE;
|
is_num = FALSE;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2796,7 +2796,7 @@ _cmd_index(const Command* cmd)
|
|||||||
g_string_free(index_source, TRUE);
|
g_string_free(index_source, TRUE);
|
||||||
|
|
||||||
GString* index = g_string_new("");
|
GString* index = g_string_new("");
|
||||||
for (int i = 0; i < g_strv_length(tokens); i++) {
|
for (guint i = 0; i < g_strv_length(tokens); i++) {
|
||||||
index = g_string_append(index, tokens[i]);
|
index = g_string_append(index, tokens[i]);
|
||||||
index = g_string_append(index, " ");
|
index = g_string_append(index, " ");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ _prefs_load(void)
|
|||||||
gsize len = 0;
|
gsize len = 0;
|
||||||
auto_gcharv gchar** triggers = g_key_file_get_string_list(prefs, PREF_GROUP_NOTIFICATIONS, "room.trigger.list", &len, NULL);
|
auto_gcharv gchar** triggers = g_key_file_get_string_list(prefs, PREF_GROUP_NOTIFICATIONS, "room.trigger.list", &len, NULL);
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (gsize i = 0; i < len; i++) {
|
||||||
autocomplete_add(room_trigger_ac, triggers[i]);
|
autocomplete_add(room_trigger_ac, triggers[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -418,7 +418,7 @@ prefs_message_get_triggers(const char* const message)
|
|||||||
gsize len = 0;
|
gsize len = 0;
|
||||||
auto_gcharv gchar** triggers = g_key_file_get_string_list(prefs, PREF_GROUP_NOTIFICATIONS, "room.trigger.list", &len, NULL);
|
auto_gcharv gchar** triggers = g_key_file_get_string_list(prefs, PREF_GROUP_NOTIFICATIONS, "room.trigger.list", &len, NULL);
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (gsize i = 0; i < len; i++) {
|
||||||
auto_gchar gchar* trigger_lower = g_utf8_strdown(triggers[i], -1);
|
auto_gchar gchar* trigger_lower = g_utf8_strdown(triggers[i], -1);
|
||||||
if (g_strrstr(message_lower, trigger_lower)) {
|
if (g_strrstr(message_lower, trigger_lower)) {
|
||||||
result = g_list_append(result, strdup(triggers[i]));
|
result = g_list_append(result, strdup(triggers[i]));
|
||||||
@@ -1392,7 +1392,7 @@ prefs_get_room_notify_triggers(void)
|
|||||||
gsize len = 0;
|
gsize len = 0;
|
||||||
auto_gcharv gchar** triggers = g_key_file_get_string_list(prefs, PREF_GROUP_NOTIFICATIONS, "room.trigger.list", &len, NULL);
|
auto_gcharv gchar** triggers = g_key_file_get_string_list(prefs, PREF_GROUP_NOTIFICATIONS, "room.trigger.list", &len, NULL);
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (gsize i = 0; i < len; i++) {
|
||||||
result = g_list_append(result, strdup(triggers[i]));
|
result = g_list_append(result, strdup(triggers[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1739,7 +1739,7 @@ prefs_get_aliases(void)
|
|||||||
gsize len;
|
gsize len;
|
||||||
auto_gcharv gchar** keys = g_key_file_get_keys(prefs, PREF_GROUP_ALIAS, &len, NULL);
|
auto_gcharv gchar** keys = g_key_file_get_keys(prefs, PREF_GROUP_ALIAS, &len, NULL);
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (gsize i = 0; i < len; i++) {
|
||||||
char* name = keys[i];
|
char* name = keys[i];
|
||||||
auto_gchar gchar* value = g_key_file_get_string(prefs, PREF_GROUP_ALIAS, name, NULL);
|
auto_gchar gchar* value = g_key_file_get_string(prefs, PREF_GROUP_ALIAS, name, NULL);
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ tlscerts_init(void)
|
|||||||
gsize len = 0;
|
gsize len = 0;
|
||||||
auto_gcharv gchar** groups = g_key_file_get_groups(tlscerts, &len);
|
auto_gcharv gchar** groups = g_key_file_get_groups(tlscerts, &len);
|
||||||
|
|
||||||
for (int i = 0; i < g_strv_length(groups); i++) {
|
for (guint i = 0; i < g_strv_length(groups); i++) {
|
||||||
autocomplete_add(certs_ac, groups[i]);
|
autocomplete_add(certs_ac, groups[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ p_gpg_on_connect(const char* const barejid)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (gsize i = 0; i < len; i++) {
|
||||||
GError* gerr = NULL;
|
GError* gerr = NULL;
|
||||||
gchar* jid = jids[i];
|
gchar* jid = jids[i];
|
||||||
auto_gchar gchar* keyid = g_key_file_get_string(pubkeyfile, jid, "keyid", &gerr);
|
auto_gchar gchar* keyid = g_key_file_get_string(pubkeyfile, jid, "keyid", &gerr);
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ plugins_init(void)
|
|||||||
if (!plugins_pref) {
|
if (!plugins_pref) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < g_strv_length(plugins_pref); i++) {
|
for (guint i = 0; i < g_strv_length(plugins_pref); i++) {
|
||||||
gboolean loaded = FALSE;
|
gboolean loaded = FALSE;
|
||||||
gchar* filename = plugins_pref[i];
|
gchar* filename = plugins_pref[i];
|
||||||
#ifdef HAVE_PYTHON
|
#ifdef HAVE_PYTHON
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ autocomplete_add(Autocomplete ac, const char* item)
|
|||||||
void
|
void
|
||||||
autocomplete_add_all(Autocomplete ac, char** items)
|
autocomplete_add_all(Autocomplete ac, char** items)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < g_strv_length(items); i++) {
|
for (guint i = 0; i < g_strv_length(items); i++) {
|
||||||
autocomplete_add(ac, items[i]);
|
autocomplete_add(ac, items[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,7 +205,7 @@ autocomplete_remove(Autocomplete ac, const char* const item)
|
|||||||
void
|
void
|
||||||
autocomplete_remove_all(Autocomplete ac, char** items)
|
autocomplete_remove_all(Autocomplete ac, char** items)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < g_strv_length(items); i++) {
|
for (guint i = 0; i < g_strv_length(items); i++) {
|
||||||
autocomplete_remove(ac, items[i]);
|
autocomplete_remove(ac, items[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ GHashTable*
|
|||||||
parse_options(gchar** args, gchar** opt_keys, gboolean* res)
|
parse_options(gchar** args, gchar** opt_keys, gboolean* res)
|
||||||
{
|
{
|
||||||
GList* keys = NULL;
|
GList* keys = NULL;
|
||||||
for (int i = 0; i < g_strv_length(opt_keys); i++) {
|
for (guint i = 0; i < g_strv_length(opt_keys); i++) {
|
||||||
keys = g_list_append(keys, opt_keys[i]);
|
keys = g_list_append(keys, opt_keys[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ parse_options(gchar** args, gchar** opt_keys, gboolean* res)
|
|||||||
|
|
||||||
// validate options
|
// validate options
|
||||||
GList* found_keys = NULL;
|
GList* found_keys = NULL;
|
||||||
for (int curr = 0; curr < g_strv_length(args); curr += 2) {
|
for (guint curr = 0; curr < g_strv_length(args); curr += 2) {
|
||||||
// check if option valid
|
// check if option valid
|
||||||
if (g_list_find_custom(keys, args[curr], (GCompareFunc)g_strcmp0) == NULL) {
|
if (g_list_find_custom(keys, args[curr], (GCompareFunc)g_strcmp0) == NULL) {
|
||||||
*res = FALSE;
|
*res = FALSE;
|
||||||
@@ -377,7 +377,7 @@ parse_options(gchar** args, gchar** opt_keys, gboolean* res)
|
|||||||
// create map
|
// create map
|
||||||
options = g_hash_table_new(g_str_hash, g_str_equal);
|
options = g_hash_table_new(g_str_hash, g_str_equal);
|
||||||
*res = TRUE;
|
*res = TRUE;
|
||||||
for (int curr = 0; curr < g_strv_length(args); curr += 2) {
|
for (guint curr = 0; curr < g_strv_length(args); curr += 2) {
|
||||||
g_hash_table_insert(options, args[curr], args[curr + 1]);
|
g_hash_table_insert(options, args[curr], args[curr + 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ cons_show_help(const char* const cmd, CommandHelp* help)
|
|||||||
cons_show("");
|
cons_show("");
|
||||||
win_println(console, THEME_HELP_HEADER, "-", "%s", &cmd[1]);
|
win_println(console, THEME_HELP_HEADER, "-", "%s", &cmd[1]);
|
||||||
win_print(console, THEME_HELP_HEADER, "-", "");
|
win_print(console, THEME_HELP_HEADER, "-", "");
|
||||||
int i;
|
size_t i;
|
||||||
for (i = 0; i < strlen(cmd) - 1; i++) {
|
for (i = 0; i < strlen(cmd) - 1; i++) {
|
||||||
win_append(console, THEME_HELP_HEADER, "-");
|
win_append(console, THEME_HELP_HEADER, "-");
|
||||||
}
|
}
|
||||||
@@ -131,7 +131,7 @@ cons_show_help(const char* const cmd, CommandHelp* help)
|
|||||||
win_println(console, THEME_HELP_HEADER, "-", "Description");
|
win_println(console, THEME_HELP_HEADER, "-", "Description");
|
||||||
win_println(console, THEME_DEFAULT, "-", "%s", help->desc);
|
win_println(console, THEME_DEFAULT, "-", "%s", help->desc);
|
||||||
|
|
||||||
int maxlen = 0;
|
size_t maxlen = 0;
|
||||||
for (i = 0; help->args[i][0] != NULL; i++) {
|
for (i = 0; help->args[i][0] != NULL; i++) {
|
||||||
if (strlen(help->args[i][0]) > maxlen)
|
if (strlen(help->args[i][0]) > maxlen)
|
||||||
maxlen = strlen(help->args[i][0]);
|
maxlen = strlen(help->args[i][0]);
|
||||||
@@ -823,7 +823,7 @@ cons_show_qrcode(const char* const text)
|
|||||||
static const size_t ZOOM_SIZE = 10;
|
static const size_t ZOOM_SIZE = 10;
|
||||||
QRcode* qrcode = QRcode_encodeString(text, 0, QR_ECLEVEL_L, QR_MODE_8, 1);
|
QRcode* qrcode = QRcode_encodeString(text, 0, QR_ECLEVEL_L, QR_MODE_8, 1);
|
||||||
|
|
||||||
int width = (qrcode->width * ZOOM_SIZE);
|
size_t width = (qrcode->width * ZOOM_SIZE);
|
||||||
unsigned char* data = qrcode->data;
|
unsigned char* data = qrcode->data;
|
||||||
|
|
||||||
ProfWin* console = wins_get_console();
|
ProfWin* console = wins_get_console();
|
||||||
@@ -835,7 +835,7 @@ cons_show_qrcode(const char* const text)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < width + 2 * ZOOM_SIZE; i += ZOOM_SIZE) {
|
for (size_t i = 0; i < width + 2 * ZOOM_SIZE; i += ZOOM_SIZE) {
|
||||||
strcat(pad, "\u2588\u2588");
|
strcat(pad, "\u2588\u2588");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2760,7 +2760,7 @@ cons_show_bookmarks_ignore(gchar** list, gsize len)
|
|||||||
cons_show("");
|
cons_show("");
|
||||||
cons_show("Ignored bookmarks:");
|
cons_show("Ignored bookmarks:");
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (gsize i = 0; i < len; i++) {
|
||||||
win_print(console, THEME_DEFAULT, "-", " %s", list[i]);
|
win_print(console, THEME_DEFAULT, "-", " %s", list[i]);
|
||||||
win_newline(console);
|
win_newline(console);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1882,7 +1882,7 @@ _win_print_wrapped(WINDOW* win, const char* const message, size_t indent, int pa
|
|||||||
|
|
||||||
int curx = getcurx(win);
|
int curx = getcurx(win);
|
||||||
int cury;
|
int cury;
|
||||||
int maxx = getmaxx(win);
|
size_t maxx = getmaxx(win);
|
||||||
|
|
||||||
// wrap required
|
// wrap required
|
||||||
if (curx + wordlen > maxx) {
|
if (curx + wordlen > maxx) {
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ _caps_by_ver(const char* const ver)
|
|||||||
auto_gcharv gchar** features_list = g_key_file_get_string_list(cache, ver, "features", &features_len, NULL);
|
auto_gcharv gchar** features_list = g_key_file_get_string_list(cache, ver, "features", &features_len, NULL);
|
||||||
GSList* features = NULL;
|
GSList* features = NULL;
|
||||||
if (features_list && features_len > 0) {
|
if (features_list && features_len > 0) {
|
||||||
for (int i = 0; i < features_len; i++) {
|
for (gsize i = 0; i < features_len; i++) {
|
||||||
features = g_slist_append(features, features_list[i]);
|
features = g_slist_append(features, features_list[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ stanza_create_http_upload_request(xmpp_ctx_t* ctx, const char* const id,
|
|||||||
|
|
||||||
auto_char char* filename_cpy = strdup(upload->filename);
|
auto_char char* filename_cpy = strdup(upload->filename);
|
||||||
// strip spaces from filename (servers don't spaces)
|
// strip spaces from filename (servers don't spaces)
|
||||||
for (int i = 0; i < strlen(filename_cpy); i++) {
|
for (size_t i = 0; i < strlen(filename_cpy); i++) {
|
||||||
if (filename_cpy[i] == ' ') {
|
if (filename_cpy[i] == ' ') {
|
||||||
filename_cpy[i] = '_';
|
filename_cpy[i] = '_';
|
||||||
}
|
}
|
||||||
@@ -1863,7 +1863,7 @@ stanza_get_error_message(xmpp_stanza_t* stanza)
|
|||||||
STANZA_NAME_UNEXPECTED_REQUEST
|
STANZA_NAME_UNEXPECTED_REQUEST
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(defined_conditions); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(defined_conditions); i++) {
|
||||||
xmpp_stanza_t* cond_stanza = xmpp_stanza_get_child_by_name(error_stanza, defined_conditions[i]);
|
xmpp_stanza_t* cond_stanza = xmpp_stanza_get_child_by_name(error_stanza, defined_conditions[i]);
|
||||||
if (cond_stanza) {
|
if (cond_stanza) {
|
||||||
char* result = strdup(xmpp_stanza_get_name(cond_stanza));
|
char* result = strdup(xmpp_stanza_get_name(cond_stanza));
|
||||||
|
|||||||
Reference in New Issue
Block a user