LLNL / MACSio

A Multi-purpose, Application-Centric, Scalable I/O Proxy Application
https://computing.llnl.gov/projects/co-design/macsio
Other
34 stars 16 forks source link

Fix narrowing error. #20

Closed noguchi-k closed 4 years ago

noguchi-k commented 4 years ago

Hello. I found narrowing error building MACSio , so I suggest sourse fixes. Could you check if it is the right fix?

/spack-src/plugins/macsio_silo.c:709:9: 
error: non-constant-expression cannot be narrowed from type 
'int' to 'unsigned int' in initializer list [-Wc++11-narrowing]
             JsonGetInt(main_obj, "clargs/exercise_scr")&0x1};
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I did typecast for JsonGetInt to 'unsigned int'. I did the same fix as the reference. ・Ref: https://github.com/LLNL/MACSio/commit/51b8c40cd9813adec5dd4dd6cee948bb9ddb7ee1#diff-211e5531b37ad0c24fea756d482d80f9