macsio: cast JsonGetInt from int to unsigned int (#14736)

* macsio: cast from int to unsigned int

* macsio: apply a patch only when version is 1.1
This commit is contained in:
noguchi-k 2020-02-13 11:13:26 +09:00 committed by GitHub
parent a7b43f1015
commit 38303a6a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- spack-src/plugins/macsio_silo.c.org 2020-02-04 10:48:08.031770849 +0900
+++ spack-src/plugins/macsio_silo.c 2020-02-04 10:48:48.175592435 +0900
@@ -706,7 +706,7 @@
char fileName[256];
MACSIO_MIF_baton_t *bat;
MACSIO_MIF_ioFlags_t ioFlags = {MACSIO_MIF_WRITE,
- JsonGetInt(main_obj, "clargs/exercise_scr")&0x1};
+ (unsigned int)JsonGetInt(main_obj, "clargs/exercise_scr")&0x1};
/* Without this barrier, I get strange behavior with Silo's MACSIO_MIF interface */
//#warning CONFIRM THIS IS STILL NEEDED

View File

@ -42,6 +42,9 @@ class Macsio(CMakePackage):
depends_on('typhonio', when="+typhonio")
depends_on('scr', when="+scr")
# Ref: https://github.com/LLNL/MACSio/commit/51b8c40cd9813adec5dd4dd6cee948bb9ddb7ee1
patch('cast.patch', when='@1.1')
def cmake_args(self):
spec = self.spec
cmake_args = []