From e7e5bc4c9e3d0b1ddf1d837f29d8f233040fbe61 Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Fri, 22 Feb 2013 22:58:26 -0800 Subject: 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] --- src/cuda-sim/ptx_ir.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cuda-sim') 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 -- cgit v1.3