1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge pull request #1616 from trofi/master

gcc-12 fixes
This commit is contained in:
Michael Vetter 2021-11-26 16:43:32 +01:00 committed by GitHub
commit 9efceb8240
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ _free_command_help(CommandHelp* help)
free(help->desc);
i = 0;
while (help->args[i] != NULL && help->args[i][0] != NULL) {
while (help->args[i][0] != NULL) {
free(help->args[i][0]);
free(help->args[i][1]);
i++;

View File

@ -158,7 +158,7 @@ python_api_register_command(PyObject* self, PyObject* args)
c_synopsis[len] = NULL;
Py_ssize_t args_len = PyList_Size(arguments);
char* c_arguments[args_len == 0 ? 0 : args_len + 1][2];
char* c_arguments[args_len + 1][2];
for (i = 0; i < args_len; i++) {
PyObject* item = PyList_GetItem(arguments, i);
Py_ssize_t len2 = PyList_Size(item);
@ -196,7 +196,7 @@ python_api_register_command(PyObject* self, PyObject* args)
free(c_synopsis[i++]);
}
i = 0;
while (c_arguments[i] != NULL && c_arguments[i][0] != NULL) {
while (c_arguments[i][0] != NULL) {
free(c_arguments[i][0]);
free(c_arguments[i][1]);
i++;