From ab2090d31c79d92ffd146e4f1eaf2650b9f2a34c Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 20 Aug 2014 20:37:33 +0000 Subject: [PATCH] Remove unused functions CLG_(get_out_file) and CLG_(get_out_directory). Looks like these were leftovers from early days -- perhaps r7235. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14321 --- callgrind/dump.c | 30 +----------------------------- callgrind/global.h | 2 -- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/callgrind/dump.c b/callgrind/dump.c index 511a4c324c..aa1ecb65d5 100644 --- a/callgrind/dump.c +++ b/callgrind/dump.c @@ -37,7 +37,6 @@ static Int out_counter = 0; static HChar* out_file = 0; -static HChar* out_directory = 0; static Bool dumps_initialized = False; /* Command */ @@ -62,18 +61,6 @@ Int CLG_(get_dump_counter)(void) return out_counter; } -HChar* CLG_(get_out_file)() -{ - CLG_(init_dumps)(); - return out_file; -} - -HChar* CLG_(get_out_directory)() -{ - CLG_(init_dumps)(); - return out_directory; -} - /*------------------------------------------------------------*/ /*--- Output file related stuff ---*/ /*------------------------------------------------------------*/ @@ -1654,7 +1641,7 @@ void init_cmdbuf(void) } /* - * Set up file names for dump output: , . + * Set up file names for dump output: . * is derived from the output format string, which defaults * to "callgrind.out.%p", where %p is replaced with the PID. * For the final file name, on intermediate dumps a counter is appended, @@ -1669,7 +1656,6 @@ void init_cmdbuf(void) */ void CLG_(init_dumps)() { - Int lastSlash, i; SysRes res; static int thisPID = 0; @@ -1687,7 +1673,6 @@ void CLG_(init_dumps)() /* If a file name was already set, clean up before */ if (out_file) { VG_(free)(out_file); - VG_(free)(out_directory); VG_(free)(filename); out_counter = 0; } @@ -1696,19 +1681,6 @@ void CLG_(init_dumps)() out_file = VG_(expand_file_name)("--callgrind-out-file", CLG_(clo).out_format); - /* get base directory for dump/command/result files */ - CLG_ASSERT(out_file[0] == '/'); - lastSlash = 0; - i = 1; - while(out_file[i]) { - if (out_file[i] == '/') lastSlash = i; - i++; - } - i = lastSlash; - out_directory = (HChar*) CLG_MALLOC("cl.dump.init_dumps.1", i+1); - VG_(strncpy)(out_directory, out_file, i); - out_directory[i] = 0; - /* allocate space big enough for final filenames */ filename = (HChar*) CLG_MALLOC("cl.dump.init_dumps.2", VG_(strlen)(out_file)+32); diff --git a/callgrind/global.h b/callgrind/global.h index c9e03da095..1d79f809ad 100644 --- a/callgrind/global.h +++ b/callgrind/global.h @@ -796,8 +796,6 @@ void CLG_(run_post_signal_on_call_stack_bottom)(void); /* from dump.c */ void CLG_(init_dumps)(void); -HChar* CLG_(get_out_file)(void); -HChar* CLG_(get_out_directory)(void); /*------------------------------------------------------------*/ /*--- Exported global variables ---*/ -- 2.47.2