From: brarcher Date: Sun, 4 Nov 2012 03:20:36 +0000 (+0000) Subject: fix warning for unused variables X-Git-Tag: 0.10.0~535 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=136302185275c923e2c1f812213c58b36858f30c;p=check fix warning for unused variables This fixes a number of cases where a variable is written to but never read. Nothing functional has changed, simply silencing some warnings. git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@645 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/tests/check_check_log_internal.c b/tests/check_check_log_internal.c index 50b114b..c223534 100644 --- a/tests/check_check_log_internal.c +++ b/tests/check_check_log_internal.c @@ -38,16 +38,17 @@ END_TEST Suite *make_log_internal_suite(void) { - Suite *s; - TCase *tc_core_subunit; - + s = suite_create("Log"); - tc_core_subunit = tcase_create("Core SubUnit"); #if ENABLE_SUBUNIT + TCase *tc_core_subunit; + tc_core_subunit = tcase_create("Core SubUnit"); suite_add_tcase(s, tc_core_subunit); tcase_add_test(tc_core_subunit, test_init_logging_subunit); +#else + tcase_create("Core SubUnit"); #endif return s; diff --git a/tests/check_check_pack.c b/tests/check_check_pack.c index 9197836..4dc7a2a 100644 --- a/tests/check_check_pack.c +++ b/tests/check_check_pack.c @@ -85,13 +85,12 @@ START_TEST(test_pack_ctx) CtxMsg cmsg; char *buf; enum ck_msg_type type; - int npk, nupk; cmsg.ctx = CK_CTX_SETUP; - npk = pack (CK_MSG_CTX, &buf, (CheckMsg *) &cmsg); + pack (CK_MSG_CTX, &buf, (CheckMsg *) &cmsg); cmsg.ctx = CK_CTX_TEARDOWN; - nupk = upack (buf, (CheckMsg *) &cmsg, &type); + upack (buf, (CheckMsg *) &cmsg, &type); fail_unless (type == CK_MSG_CTX, "Bad type unpacked for CtxMsg"); diff --git a/tests/check_check_sub.c b/tests/check_check_sub.c index e400acd..a3c5dd7 100644 --- a/tests/check_check_sub.c +++ b/tests/check_check_sub.c @@ -377,13 +377,12 @@ START_TEST(test_null) { Suite *s; TCase *tc; - SRunner *sr; s = suite_create(NULL); tc = tcase_create(NULL); suite_add_tcase (s, NULL); tcase_add_test (tc, NULL); - sr = srunner_create(NULL); + srunner_create(NULL); srunner_run_all (NULL, -1); srunner_free (NULL); fail("Completed properly");