[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 4 15:07:32 UTC 2018


 sc/source/core/opencl/op_statistical.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 93054cd09f521499ed48848cb4d3563e629593f7
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Nov 27 15:35:27 2018 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Tue Dec 4 16:07:06 2018 +0100

    check that OpenCL NORMDIST() takes a proper number of arguments
    
    Change-Id: I885a1b70556311f5a0862fec24a3596dbeada5d6
    Reviewed-on: https://gerrit.libreoffice.org/64243
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index 374b383dcc4c..5278ad2b31f7 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -4016,6 +4016,7 @@ void OpNormdist::GenSlidingWindowFunction(
     std::stringstream &ss, const std::string &sSymName,
     SubArguments &vSubArguments)
 {
+    CHECK_PARAMETER_COUNT(3,4);
     ss << "\ndouble " << sSymName;
     ss << "_"<< BinFuncName() <<"(";
     for (size_t i = 0; i < vSubArguments.size(); i++)
@@ -4028,7 +4029,8 @@ void OpNormdist::GenSlidingWindowFunction(
     ss << "{\n";
     ss << "    double x,mue,sigma,c;\n";
     ss << "    int gid0=get_global_id(0);\n";
-    ss << "    double tmp0,tmp1,tmp2,tmp3;\n";
+    ss << "    double tmp0,tmp1,tmp2;\n";
+    ss << "    double tmp3 = 0;\n"; // optional argument
     ss <<"\n    ";
     for (size_t i = 0; i < vSubArguments.size(); i++)
     {


More information about the Libreoffice-commits mailing list