diff options
| author | Tim Rogers <[email protected]> | 2013-02-22 22:58:26 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:05 -0700 |
| commit | e7e5bc4c9e3d0b1ddf1d837f29d8f233040fbe61 (patch) | |
| tree | a85f3938b0f6b8bb905768cb23803e3c903a5923 | |
| parent | 1f421f9fd3f576880d21483aed369576b08143d1 (diff) | |
Okay, both the crash and the valgrind complaint are caused by the non-type safeness of fprintf.
Fix is to explicitly tell fprintf that the to_string.c_str() result is a string.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15312]
| -rw-r--r-- | src/cuda-sim/ptx_ir.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cuda-sim/ptx_ir.cc b/src/cuda-sim/ptx_ir.cc index 242901b..a442e2e 100644 --- a/src/cuda-sim/ptx_ir.cc +++ b/src/cuda-sim/ptx_ir.cc @@ -1208,7 +1208,7 @@ void ptx_instruction::print_insn() const void ptx_instruction::print_insn( FILE *fp ) const { - fprintf( fp, to_string().c_str() ); + fprintf( fp, "%s", to_string().c_str() ); } std::string ptx_instruction::to_string() const |
