fix compile warning regression introduced recently
editcmd.c:3647:9: error: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
editcmd.c:3653:32: error: passing argument 1 of 'g_free' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
patch against 52fd328042a426e885da891c8ce8218cda3a1cf7
compile test with GCC 5.2.0
Signed-off-by: Andreas Mohr <and@gmx.li>
a
|
b
|
|
3601 | 3601 | { |
3602 | 3602 | GArray *suggest; |
3603 | 3603 | unsigned int res; |
| 3604 | guint i; |
3604 | 3605 | |
3605 | 3606 | suggest = g_array_new (TRUE, FALSE, sizeof (char *)); |
3606 | 3607 | |
… |
… |
|
3620 | 3621 | |
3621 | 3622 | if (retval == B_ENTER && new_word != NULL) |
3622 | 3623 | { |
3623 | | guint i; |
3624 | 3624 | char *cp_word; |
3625 | 3625 | |
3626 | 3626 | #ifdef HAVE_CHARSET |
… |
… |
|
3644 | 3644 | else if (retval == B_ADD_WORD && match_word != NULL) |
3645 | 3645 | aspell_add_to_dict (match_word->str, (int) word_len); |
3646 | 3646 | } |
3647 | | guint i; |
3648 | 3647 | for (i = 0; i < suggest->len; i++) |
3649 | 3648 | { |
3650 | | const char *cur_sugg_word; |
3651 | | cur_sugg_word = g_array_index (suggest, const char *, i); |
| 3649 | char *cur_sugg_word; |
| 3650 | cur_sugg_word = g_array_index (suggest, char *, i); |
3652 | 3651 | if (cur_sugg_word != NULL) |
3653 | | (void) g_free (cur_sugg_word); |
| 3652 | g_free (cur_sugg_word); |
3654 | 3653 | } |
3655 | 3654 | g_array_free (suggest, TRUE); |
3656 | 3655 | edit->found_start = 0; |