aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-06 12:11:19 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-17 13:44:21 +0000
commit7da45b21b76965e021e8a049715b1dee34081f7c (patch)
tree7e03e8234ee8b507e83111f7279b36d338fa6081 /src
parent71c357e416c37c7b7d7cd2efa95635018bd105f5 (diff)
Fix warning about returning address of local variable by MSVC2015 in qv4engine.cpp.
qtdeclarative\src\qml\jsruntime\qv4engine.cpp(179) : warning C4172: returning address of local variable or temporary: dummy Disable warning as using the address is intended. Change-Id: Ide894a8dc2fb94f11d0455723c46567c84d91f8d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 0f2b44fac6..e1282eeca9 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -108,6 +108,9 @@ static ReturnedValue throwTypeError(CallContext *ctx)
const int MinimumStackSize = 256; // in kbytes
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_MSVC(4172) // MSVC 2015: warning C4172: returning address of local variable or temporary: dummy
+
quintptr getStackLimit()
{
quintptr stackLimit;
@@ -172,6 +175,7 @@ quintptr getStackLimit()
int dummy;
// this is inexact, as part of the stack is used when being called here,
// but let's simply default to 1MB from where the stack is right now
+ // (Note: triggers warning C4172 as of MSVC 2015, returning address of local variable)
stackLimit = reinterpret_cast<qintptr>(&dummy) - 1024*1024;
#endif
@@ -179,6 +183,7 @@ quintptr getStackLimit()
return stackLimit + MinimumStackSize*1024;
}
+QT_WARNING_POP
QJSEngine *ExecutionEngine::jsEngine() const
{