From e8b8a12b7365c17cf0326be365b78bcb1da1bfac Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 12 Mar 2013 10:48:05 -0700 Subject: Mods to make compile on gcc 4.6.3 work mo betta --- indra/test/llstreamtools_tut.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/test/llstreamtools_tut.cpp') diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp index a93f2e8f65..68e56b5ee2 100644 --- a/indra/test/llstreamtools_tut.cpp +++ b/indra/test/llstreamtools_tut.cpp @@ -386,15 +386,17 @@ namespace tut std::string actual_result; std::istringstream is; bool ret; - is.clear(); is.str(str = " First Second \t \r \n Third Fourth-ShouldThisBePartOfFourth Fifth\n"); actual_result = ""; ret = get_word(actual_result, is); // First + (void)ret; actual_result = ""; ret = get_word(actual_result, is); // Second + (void)ret; actual_result = ""; ret = get_word(actual_result, is); // Third + (void)ret; // the current implementation of get_word seems inconsistent with // skip_to_next_word. skip_to_next_word treats any character other @@ -486,6 +488,7 @@ namespace tut is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"); actual_result = ""; ret = get_line(actual_result, is); + (void)ret; expected_result = "First Second \t \r\n"; ensure_equals("get_line: 1", actual_result, expected_result); @@ -551,6 +554,7 @@ namespace tut is.str(str = "Should not skip lone \r.\r\n"); actual_result = ""; ret = get_line(actual_result, is); + (void)ret; expected_result = "Should not skip lone \r.\r\n"; ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result); } @@ -569,6 +573,7 @@ namespace tut is.str(str = "\n"); actual_result = ""; ret = get_line(actual_result, is); + (void)ret; expected_result = "\n"; ensure_equals("get_line: Just newline", actual_result, expected_result); } @@ -588,6 +593,7 @@ namespace tut is.str(str = "First Line.\nSecond Line.\n"); actual_result = ""; ret = get_line(actual_result, is, 255); + (void)ret; expected_result = "First Line.\n"; ensure_equals("get_line: Basic Operation", actual_result, expected_result); -- cgit v1.2.3 From b7235f1a4492bf4365d241e239eb49fb3ae8bb3e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 22 Apr 2013 14:35:07 -0400 Subject: MAINT-2612: Remove no-longer-valid unused-var warning suppressions. Somehow viewer-cat acquired a lot of source lines (in several different files) of the form: (void)somevar; where ?somevar? was not declared. Apparently someone introduced an unused declaration of ?somevar?, encountered unused-variable warnings, introduced the (void) casts to suppress those warnings, then deleted the declarations -- without deleting the (void) casts. It seems worth noting that the resulting code should not have compiled successfully on any platform. --- indra/test/llstreamtools_tut.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/test/llstreamtools_tut.cpp') diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp index a9bb15d911..354c3dfe10 100644 --- a/indra/test/llstreamtools_tut.cpp +++ b/indra/test/llstreamtools_tut.cpp @@ -389,13 +389,10 @@ namespace tut is.str(str = " First Second \t \r \n Third Fourth-ShouldThisBePartOfFourth Fifth\n"); actual_result = ""; get_word(actual_result, is); // First - (void)ret; actual_result = ""; get_word(actual_result, is); // Second - (void)ret; actual_result = ""; get_word(actual_result, is); // Third - (void)ret; // the current implementation of get_word seems inconsistent with // skip_to_next_word. skip_to_next_word treats any character other @@ -486,7 +483,6 @@ namespace tut is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n"); actual_result = ""; get_line(actual_result, is); - (void)ret; expected_result = "First Second \t \r\n"; ensure_equals("get_line: 1", actual_result, expected_result); @@ -551,7 +547,6 @@ namespace tut is.str(str = "Should not skip lone \r.\r\n"); actual_result = ""; get_line(actual_result, is); - (void)ret; expected_result = "Should not skip lone \r.\r\n"; ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result); } @@ -569,7 +564,6 @@ namespace tut is.str(str = "\n"); actual_result = ""; get_line(actual_result, is); - (void)ret; expected_result = "\n"; ensure_equals("get_line: Just newline", actual_result, expected_result); } @@ -588,7 +582,6 @@ namespace tut is.str(str = "First Line.\nSecond Line.\n"); actual_result = ""; get_line(actual_result, is, 255); - (void)ret; expected_result = "First Line.\n"; ensure_equals("get_line: Basic Operation", actual_result, expected_result); -- cgit v1.2.3