summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-09-04 08:28:54 -0700
committerRom Lemarchand <romlem@google.com>2014-09-04 15:52:47 +0000
commit457296ad6c8bf3533a90780a8c28ced84a2301e7 (patch)
treebf65b773a3e54cfc7af6593153666e45a34e5c91 /include/ui
parent98e56d926bce70a0a3257c573a92944c8057b528 (diff)
downloadframeworks_native-457296ad6c8bf3533a90780a8c28ced84a2301e7.zip
frameworks_native-457296ad6c8bf3533a90780a8c28ced84a2301e7.tar.gz
frameworks_native-457296ad6c8bf3533a90780a8c28ced84a2301e7.tar.bz2
Fix undefined behavior (not returning a value from a function with return).
Bug: 17379740 This function was missing a return statement, even though it declares a return type. This is undefined behavior, which clang miscompiled into just falling through to a later function in some cases. Adding the return statement fixes the undefined behavior (and probably fixes a bug too). Change-Id: I05c03b6473b831769dc4fa8b5ba43fb4249f7626
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/mat4.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ui/mat4.h b/include/ui/mat4.h
index d9647cc..4fd1eff 100644
--- a/include/ui/mat4.h
+++ b/include/ui/mat4.h
@@ -322,6 +322,7 @@ tmat44<T> tmat44<T>::rotate(A radian, const tvec3<B>& about) {
r[ 1] = xy*nc + zs; r[ 5] = y*y*nc + c; r[ 9] = yz*nc - xs;
r[ 2] = zx*nc - ys; r[ 6] = yz*nc + xs; r[10] = z*z*nc + c;
}
+ return rotation;
}
// ----------------------------------------------------------------------------------------