From: cpickett Date: Sun, 28 Dec 2008 22:16:00 +0000 (+0000) Subject: * silence some more unused parameter warnings X-Git-Tag: 0.10.0~691 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a47052bd97e243ea8bfa7836e13c1451cc02a869;p=check * silence some more unused parameter warnings git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@471 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/src/check_log.c b/src/check_log.c index 2cb9a77..1d2a3c4 100644 --- a/src/check_log.c +++ b/src/check_log.c @@ -173,7 +173,7 @@ void stdout_lfun (SRunner *sr, FILE *file, enum print_output printmode, } -void lfile_lfun (SRunner *sr, FILE *file, enum print_output printmode, +void lfile_lfun (SRunner *sr, FILE *file, enum print_output printmode CK_ATTRIBUTE_UNUSED, void *obj, enum cl_event evt) { TestResult *tr; @@ -208,7 +208,7 @@ void lfile_lfun (SRunner *sr, FILE *file, enum print_output printmode, } -void xml_lfun (SRunner *sr, FILE *file, enum print_output printmode, +void xml_lfun (SRunner *sr CK_ATTRIBUTE_UNUSED, FILE *file, enum print_output printmode CK_ATTRIBUTE_UNUSED, void *obj, enum cl_event evt) { TestResult *tr; diff --git a/src/check_print.c b/src/check_print.c index 46c20da..8ea87d0 100644 --- a/src/check_print.c +++ b/src/check_print.c @@ -92,7 +92,7 @@ void tr_fprint (FILE *file, TestResult *tr, enum print_output print_mode) } } -void tr_xmlprint (FILE *file, TestResult *tr, enum print_output print_mode) +void tr_xmlprint (FILE *file, TestResult *tr, enum print_output print_mode CK_ATTRIBUTE_UNUSED) { char result[10]; char *path_name; diff --git a/tests/check_check_sub.c b/tests/check_check_sub.c index d49e95a..6062630 100644 --- a/tests/check_check_sub.c +++ b/tests/check_check_sub.c @@ -313,9 +313,9 @@ END_TEST START_TEST(test_fork1p_pass) { - pid_t pid; - #ifdef _POSIX_VERSION + pid_t pid; + if((pid = fork()) < 0) { fail("Failed to fork new process"); } else if (pid > 0) { @@ -334,9 +334,9 @@ END_TEST START_TEST(test_fork1p_fail) { +#ifdef _POSIX_VERSION pid_t pid; -#ifdef _POSIX_VERSION if((pid = fork()) < 0) { fail("Failed to fork new process"); } else if (pid > 0) {