From c2a8f6f59a81cd2d0703442f4b90a74127163258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 28 Sep 2013 09:32:41 +0200 Subject: [PATCH] astyle formatting --- lib/checkautovariables.cpp | 4 ++-- test/testautovariables.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/checkautovariables.cpp b/lib/checkautovariables.cpp index cd98cef38..83b54ad7e 100644 --- a/lib/checkautovariables.cpp +++ b/lib/checkautovariables.cpp @@ -101,9 +101,9 @@ static bool checkRvalueExpression(const Token * const vartok) static bool variableIsUsedInScope(const Token* start, unsigned int varId, const Scope *scope) { - if(!start) // Ticket #5024 + if (!start) // Ticket #5024 return false; - + for (const Token *tok = start; tok != scope->classEnd; tok = tok->next()) { if (tok->varId() == varId) return true; diff --git a/test/testautovariables.cpp b/test/testautovariables.cpp index 5200322d5..22014eb4d 100644 --- a/test/testautovariables.cpp +++ b/test/testautovariables.cpp @@ -326,7 +326,7 @@ private: "}"); ASSERT_EQUALS("[test.cpp:6]: (error) Address of local auto-variable assigned to a function parameter.\n", errout.str()); } - + void testautovar12() { // Ticket #5024 - Crash on invalid input check("void f(int* a) { a = }"); }