void authenticate_and_launch(int nmissiles) { int allowaccess = 0; char response[8]; printf("Secret: "); gets(response); if (strcmp(response, "Joshua") == 0) { allowaccess = 1; } if (allowaccess) { puts("Access granted"); launch_missiles(nmissiles); } if (!allowaccess) puts("Access denied"); }
void test_missiles() { enable_missile_safety_mode(); // expected-warning {{ignoring return value of function declared with 'nodiscard'}} launch_missiles(); }