Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/MesaLib/dist/src/intel/compiler Avoid truncat...



details:   https://anonhg.NetBSD.org/xsrc/rev/ad18ab80f43a
branches:  trunk
changeset: 10405:ad18ab80f43a
user:      maya <maya%NetBSD.org@localhost>
date:      Wed Sep 25 14:53:20 2019 +0000

description:
Avoid truncating int64_t to int. Found by clang.

diffstat:

 external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 4bed635ed58c -r ad18ab80f43a external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp
--- a/external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp Tue Sep 24 21:40:36 2019 +0000
+++ b/external/mit/MesaLib/dist/src/intel/compiler/brw_fs_combine_constants.cpp Wed Sep 25 14:53:20 2019 +0000
@@ -34,6 +34,7 @@
  * cannot use immediate values.
  */
 
+#include <cstdlib>
 #include "brw_fs.h"
 #include "brw_cfg.h"
 #include "util/half_float.h"
@@ -232,7 +233,7 @@
       break;
    }
    case BRW_REGISTER_TYPE_Q: {
-      int64_t val = !can_do_source_mods ? src->d64 : abs(src->d64);
+      int64_t val = !can_do_source_mods ? src->d64 : std::abs(src->d64);
       memcpy(out, &val, 8);
       break;
    }



Home | Main Index | Thread Index | Old Index