Warning cleanup

- ignoring const
- declarations after statements
- some C files didnt include own headers (risking them getting out of sync)

Closes #1064
This commit is contained in:
Campbell Barton
2014-07-19 13:36:13 +10:00
committed by TingPing
parent 9fb4eb5107
commit f83d78dd28
17 changed files with 29 additions and 21 deletions

View File

@ -414,6 +414,9 @@ Util_BuildEOLList(char *word[])
PyObject *list;
int listsize = 31;
int i;
char *accum = NULL;
char *last = NULL;
/* Find the last valid array member; there may be intermediate NULLs that
* would otherwise cause us to drop some members. */
while (listsize > 0 &&
@ -424,10 +427,9 @@ Util_BuildEOLList(char *word[])
PyErr_Print();
return NULL;
}
char *accum = NULL;
char *last = NULL;
for (i = listsize; i > 0; i--) {
char *part = word[i];
PyObject *uni_part;
if (accum == NULL) {
accum = g_strdup (part);
} else if (part != NULL && part[0] != 0) {
@ -443,7 +445,7 @@ Util_BuildEOLList(char *word[])
return NULL;
}
}
PyObject *uni_part = PyUnicode_FromString(accum);
uni_part = PyUnicode_FromString(accum);
PyList_SetItem(list, i - 1, uni_part);
}