[Box Backup-commit] COMMIT r1515 - box/chris/general/lib/common

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sun Apr 15 22:54:17 BST 2007


Author: chris
Date: 2007-04-15 22:54:17 +0100 (Sun, 15 Apr 2007)
New Revision: 1515

Modified:
   box/chris/general/lib/common/Test.h
Log:
Display file and line where memory leak test failed.


Modified: box/chris/general/lib/common/Test.h
===================================================================
--- box/chris/general/lib/common/Test.h	2007-04-15 21:53:12 UTC (rev 1514)
+++ box/chris/general/lib/common/Test.h	2007-04-15 21:54:17 UTC (rev 1515)
@@ -317,7 +317,8 @@
 			first_fail_line = line;
 		}
 		++failures;
-		printf("FAILURE: MemLeak report not available (file %s)\n", filename);
+		printf("FAILURE: MemLeak report not available (file %s) "
+			"at %s:%d\n", filename, file, line);
 	}
 	else
 	{
@@ -331,12 +332,13 @@
 			}
 			++failures;
 			printf("FAILURE: Memory leaks found in other process "
-				"(file %s)\n==========\n", filename);
+				"(file %s) at %s:%d\n==========\n", 
+				filename, file, line);
 			FILE *f = fopen(filename, "r");
-			char line[512];
-			while(::fgets(line, sizeof(line), f) != 0)
+			char linebuf[512];
+			while(::fgets(linebuf, sizeof(linebuf), f) != 0)
 			{
-				printf("%s", line);
+				printf("%s", linebuf);
 			}
 			fclose(f);
 			printf("==========\n");




More information about the Boxbackup-commit mailing list