fixing the 'expression is constant' warning (caused by the do/while), using the advice found at: http://stackoverflow.com/questions/1946445/c-c-how-to-use-the-do-while0-construct-without-compiler-warnings-like-c412