Skip to contentSkip to conversation

lib/tst_test.c: Silence warnings.

PATCH New Cyril Hrubis 1 participant 1 message Sep 3, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/tst_test.c: Silence warnings.

The tst_brk() will call exit() which will exit the test but the compiler does not know about this and produces useless warnings about fall through in switch().

---
 lib/tst_test.c | 2 ++
 1 file changed, 2 insertions(+)
lib/tst_test.c +2 -0
index bdd47f562..adc525a1e 100644
@@ -352,6 +352,7 @@ static void check_child_status(pid_t pid, int status)
 	case TBROK:
 	case TCONF:
 		tst_brk(ret, "Reported by child (%i)", pid);
+	break;
 	default:
 		tst_brk(TBROK, "Invalid child (%i) exit value %i", pid, ret);
 	}
@@ -493,6 +494,7 @@ static void parse_opts(int argc, char *argv[])
 		case '?':
 			print_help();
 			tst_brk(TBROK, "Invalid option");
+		break;
 		case 'h':
 			print_help();
 			exit(0);
Signature · 1 line
2.16.4