@@ -1767,7 +1767,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
17671767 "/history" , "/vercheck" , "/privileges" , "/wrap" ,
17681768 "/carbons" , "/slashguard" , "/mam" , "/silence" };
17691769
1770- for (int i = 0 ; i < ARRAY_SIZE (boolean_choices ); i ++ ) {
1770+ for (size_t i = 0 ; i < ARRAY_SIZE (boolean_choices ); i ++ ) {
17711771 result = autocomplete_param_with_func (input , boolean_choices [i ], prefs_autocomplete_boolean_choice , previous , NULL );
17721772 if (result ) {
17731773 return result ;
@@ -1784,7 +1784,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
17841784
17851785 // Remove quote character before and after names when doing autocomplete
17861786 char * unquoted = strip_arg_quotes (input );
1787- for (int i = 0 ; i < ARRAY_SIZE (nick_choices ); i ++ ) {
1787+ for (size_t i = 0 ; i < ARRAY_SIZE (nick_choices ); i ++ ) {
17881788 result = autocomplete_param_with_ac (unquoted , nick_choices [i ], nick_ac , TRUE, previous );
17891789 if (result ) {
17901790 free (unquoted );
@@ -1799,7 +1799,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
17991799 gchar * contact_choices [] = { "/msg" , "/info" };
18001800 // Remove quote character before and after names when doing autocomplete
18011801 char * unquoted = strip_arg_quotes (input );
1802- for (int i = 0 ; i < ARRAY_SIZE (contact_choices ); i ++ ) {
1802+ for (size_t i = 0 ; i < ARRAY_SIZE (contact_choices ); i ++ ) {
18031803 result = autocomplete_param_with_func (unquoted , contact_choices [i ], roster_contact_autocomplete , previous , NULL );
18041804 if (result ) {
18051805 free (unquoted );
@@ -1814,7 +1814,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
18141814 free (unquoted );
18151815
18161816 gchar * resource_choices [] = { "/caps" , "/ping" };
1817- for (int i = 0 ; i < ARRAY_SIZE (resource_choices ); i ++ ) {
1817+ for (size_t i = 0 ; i < ARRAY_SIZE (resource_choices ); i ++ ) {
18181818 result = autocomplete_param_with_func (input , resource_choices [i ], roster_fulljid_autocomplete , previous , NULL );
18191819 if (result ) {
18201820 return result ;
@@ -1823,7 +1823,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
18231823 }
18241824
18251825 gchar * invite_choices [] = { "/join" };
1826- for (int i = 0 ; i < ARRAY_SIZE (invite_choices ); i ++ ) {
1826+ for (size_t i = 0 ; i < ARRAY_SIZE (invite_choices ); i ++ ) {
18271827 result = autocomplete_param_with_func (input , invite_choices [i ], muc_invites_find , previous , NULL );
18281828 if (result ) {
18291829 return result ;
@@ -1843,7 +1843,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
18431843 { "/inputwin" , winpos_ac },
18441844 };
18451845
1846- for (int i = 0 ; i < ARRAY_SIZE (ac_cmds ); i ++ ) {
1846+ for (size_t i = 0 ; i < ARRAY_SIZE (ac_cmds ); i ++ ) {
18471847 result = autocomplete_param_with_ac (input , ac_cmds [i ].cmd , ac_cmds [i ].completer , TRUE, previous );
18481848 if (result ) {
18491849 return result ;
@@ -1863,7 +1863,8 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
18631863 }
18641864 parsed [i ] = '\0' ;
18651865
1866- char * (* ac_func )(ProfWin * , const char * const , gboolean ) = g_hash_table_lookup (ac_funcs , parsed );
1866+ char * (* ac_func )(ProfWin * , const char * const , gboolean ) = (char * (* )(ProfWin * , const char * const , gboolean ))g_hash_table_lookup (ac_funcs , parsed );
1867+
18671868 if (ac_func ) {
18681869 result = ac_func (window , input , previous );
18691870 if (result ) {
@@ -1932,7 +1933,7 @@ _who_autocomplete(ProfWin* window, const char* const input, gboolean previous)
19321933 "/who chat" , "/who away" , "/who xa" , "/who dnd" , "/who available" ,
19331934 "/who unavailable" };
19341935
1935- for (int i = 0 ; i < ARRAY_SIZE (group_commands ); i ++ ) {
1936+ for (size_t i = 0 ; i < ARRAY_SIZE (group_commands ); i ++ ) {
19361937 result = autocomplete_param_with_func (input , group_commands [i ], roster_group_autocomplete , previous , NULL );
19371938 if (result ) {
19381939 return result ;
@@ -2254,7 +2255,7 @@ _notify_autocomplete(ProfWin* window, const char* const input, gboolean previous
22542255
22552256 gchar * boolean_choices1 [] = { "/notify room current" , "/notify chat current" , "/notify typing current" ,
22562257 "/notify room text" , "/notify chat text" , "/notify room offline" };
2257- for (int i = 0 ; i < ARRAY_SIZE (boolean_choices1 ); i ++ ) {
2258+ for (size_t i = 0 ; i < ARRAY_SIZE (boolean_choices1 ); i ++ ) {
22582259 result = autocomplete_param_with_func (input , boolean_choices1 [i ], prefs_autocomplete_boolean_choice , previous , NULL );
22592260 if (result ) {
22602261 return result ;
@@ -2287,7 +2288,7 @@ _notify_autocomplete(ProfWin* window, const char* const input, gboolean previous
22872288 }
22882289
22892290 gchar * boolean_choices2 [] = { "/notify invite" , "/notify sub" , "/notify mention" , "/notify trigger" };
2290- for (int i = 0 ; i < ARRAY_SIZE (boolean_choices2 ); i ++ ) {
2291+ for (size_t i = 0 ; i < ARRAY_SIZE (boolean_choices2 ); i ++ ) {
22912292 result = autocomplete_param_with_func (input , boolean_choices2 [i ], prefs_autocomplete_boolean_choice , previous , NULL );
22922293 if (result ) {
22932294 return result ;
@@ -3733,7 +3734,7 @@ _account_autocomplete(ProfWin* window, const char* const input, gboolean previou
37333734 "/account disable" , "/account rename" , "/account clear" , "/account remove" ,
37343735 "/account default set" };
37353736
3736- for (int i = 0 ; i < ARRAY_SIZE (account_choice ); i ++ ) {
3737+ for (size_t i = 0 ; i < ARRAY_SIZE (account_choice ); i ++ ) {
37373738 found = autocomplete_param_with_func (input , account_choice [i ], accounts_find_all , previous , NULL );
37383739 if (found ) {
37393740 return found ;
@@ -4274,7 +4275,7 @@ _vcard_autocomplete(ProfWin* window, const char* const input, gboolean previous)
42744275 gboolean is_num = TRUE;
42754276
42764277 if (num_args >= 2 ) {
4277- for (int i = 0 ; i < strlen (args [1 ]); i ++ ) {
4278+ for (size_t i = 0 ; i < strlen (args [1 ]); i ++ ) {
42784279 if (!isdigit ((int )args [1 ][i ])) {
42794280 is_num = FALSE;
42804281 break ;
0 commit comments