Skip to content

Commit

Permalink
Merge branch 'master' into add-compiler-warnings-to-cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
brarcher authored Oct 26, 2019
2 parents 3fc9e9d + 5c6ba01 commit 2d5c89a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT
include(GNUInstallDirs)

###############################################################################
# Adhere strictly to old ANSI C89 / ISO C90 standard
set(CMAKE_C_STANDARD 90)
# Follow ISO C99 standard
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON) # Use GNU extensions and POSIX standard

Expand Down
6 changes: 5 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
In Development:
# Mentioning Check 0.13.0 for now, to fix distcheck target until next release


Sat Oct 20, 2019: Released Check 0.13.0
based on hash 2b18886a9a9d3bab44917a550d12128ad7e2c197

Expand All @@ -7,7 +11,7 @@ Sat Oct 20, 2019: Released Check 0.13.0
* missing <unistd.h> in some files
Issue #196 and Issue #186 (GitHub)

* Varous documentation improvements
* Various documentation improvements

* END_TEST is now optional, as how START_TEST works has been redone
Issue #158
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h3>Latest Check Release</h3>

<p>
<!-- Update this section during a release -->
<b>Oct 20, 2017:</b> Check 0.12.0 <a href="https://github.com/libcheck/check/releases">
<b>Oct 20, 2019:</b> Check 0.13.0 <a href="https://github.com/libcheck/check/releases">
is now available for download</a>. Check is available under the
<a href="./COPYING.LESSER">LGPL license</a>. New features available in
this release are listed on the <a href="./NEWS">NEWS</a> page.
Expand Down
2 changes: 1 addition & 1 deletion src/check_pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static size_t get_max_msg_size(void)
size_t value = 0;
char *env = getenv("CK_MAX_MSG_SIZE");
if (env)
value = (size_t)strtoul(env, NULL, 10); // Cast in case size_t != unsigned long.
value = (size_t)strtoul(env, NULL, 10); /* Cast in case size_t != unsigned long. */
if (value == 0)
value = ck_max_msg_size;
if (value == 0)
Expand Down
4 changes: 4 additions & 0 deletions src/check_run.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#include <signal.h>
#include <setjmp.h>

#if defined(HAVE_FORK) && HAVE_FORK==1
# include <sys/wait.h>
#endif

#include "check.h"
#include "check_error.h"
#include "check_list.h"
Expand Down
4 changes: 2 additions & 2 deletions tests/check_check_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ char * line_num_failures_file_name = NULL;

enum ck_test_msg_type_t {
#if ENABLE_REGEX
// For tests with different output on different platforms
/* For tests with different output on different platforms */
CK_MSG_REGEXP,
#endif
// Simple text
/* Simple text */
CK_MSG_TEXT
};

Expand Down
6 changes: 3 additions & 3 deletions tests/check_check_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ START_TEST(test_ck_assert_float_finite)
record_test_name(tcase_name());

ck_assert_float_finite(x);
// MS VS doesn't allow explicit division by zero
/* MS VS doesn't allow explicit division by zero */
x = 1.0f / (1.0f - t);
record_failure_line_num(__LINE__);
ck_assert_float_finite(x);
Expand Down Expand Up @@ -1452,7 +1452,7 @@ START_TEST(test_ck_assert_double_finite)
record_test_name(tcase_name());

ck_assert_double_finite(x);
// MS VS doesn't allow explicit division by zero
/* MS VS doesn't allow explicit division by zero */
x = 1.0 / (1.0 - t);
record_failure_line_num(__LINE__);
ck_assert_double_finite(x);
Expand Down Expand Up @@ -1970,7 +1970,7 @@ START_TEST(test_ck_assert_ldouble_finite)
record_test_name(tcase_name());

ck_assert_ldouble_finite(x);
// MS VS doesn't allow explicit division by zero
/* MS VS doesn't allow explicit division by zero */
x = 1.0l / (1.0l - t);
record_failure_line_num(__LINE__);
ck_assert_ldouble_finite(x);
Expand Down
4 changes: 2 additions & 2 deletions tests/check_set_max_msg_size.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ int main (int argc, char *argv[])
* Run the test suite. This is intended to trigger the "Message is too long" error.
* Actual success/failure is determined by examining the output.
*/
check_set_max_msg_size(32); // 1st call has no effect since
check_set_max_msg_size(atoi(argv[1])); // the 2nd call will override it.
check_set_max_msg_size(32); /* 1st call has no effect since */
check_set_max_msg_size(atoi(argv[1])); /* the 2nd call will override it. */
sr = srunner_create(make_set_max_msg_size_suite());
srunner_run_all(sr, CK_NORMAL);
srunner_free(sr);
Expand Down

0 comments on commit 2d5c89a

Please sign in to comment.