diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-02-25 06:26:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-02-25 06:26:02 +0300 |
commit | 2eb85c01f3e0ea2ba9dd129ae70e8b370953d7b5 (patch) | |
tree | ba17d1fecef75d17946361484c48be4361406875 /source/gameengine/Expressions | |
parent | 56e9c87309e155d6710067759c415279848b6bea (diff) |
remove warnings for the BGE
- variables that shadow vers declared earlier
- Py_Fatal print an error to the stderr
- gcc was complaining about the order of initialized vars (for classes)
- const return values for ints and bools didnt do anything.
- braces for ambiguous if statements
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r-- | source/gameengine/Expressions/InputParser.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp index a60e1ee59dc..e016fb8d007 100644 --- a/source/gameengine/Expressions/InputParser.cpp +++ b/source/gameengine/Expressions/InputParser.cpp @@ -274,7 +274,7 @@ void CParser::NextSym() } else if (((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))) { // reserved word? - int start; + start = chcount; CharRep(); GrabString(start); diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index 2c4fbd5a867..e04b42ee9cc 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -147,7 +147,7 @@ PyObject *PyObjectPlus::_getattr_self(const PyAttributeDef attrlist[], void *sel if (attrdef->m_length > 1) { PyObject* resultlist = PyList_New(attrdef->m_length); - for (int i=0; i<attrdef->m_length; i++) + for (unsigned int i=0; i<attrdef->m_length; i++) { switch (attrdef->m_type) { case KX_PYATTRIBUTE_TYPE_BOOL: diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 0fae175e3cf..37eae3a8c61 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -73,7 +73,7 @@ typedef int Py_ssize_t; #endif static inline void Py_Fatal(const char *M) { - //cout << M << endl; + fprintf(stderr, "%s\n", M); exit(-1); }; |