diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-07-19 13:36:13 +1000 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-11-02 14:41:20 -0500 |
commit | f83d78dd2801c7e4bee406379d3119f8852cf297 (patch) | |
tree | 72322bd80d992ead5359ed70faeeac1ae6a73a20 /plugins/python/python.c | |
parent | 9fb4eb5107a133a4c0492f11f02cdeb014042786 (diff) |
Warning cleanup
- ignoring const - declarations after statements - some C files didnt include own headers (risking them getting out of sync) Closes #1064
Diffstat (limited to 'plugins/python/python.c')
-rw-r--r-- | plugins/python/python.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c index 1904a3e9..0ce6ad6e 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -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); } |