X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftest_urcu_fork.c;h=db4e81dcf67a36d8750684cc5f025a233a23ed33;hb=153b081a9b007aad7bece415dc3bf1125edd2da3;hp=f61420168b9005c92226760bf2a7c98356de5f77;hpb=ad46005890368f9c306f0c510b3d4b08c47b66f8;p=userspace-rcu.git diff --git a/tests/regression/test_urcu_fork.c b/tests/regression/test_urcu_fork.c index f614201..db4e81d 100644 --- a/tests/regression/test_urcu_fork.c +++ b/tests/regression/test_urcu_fork.c @@ -20,8 +20,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE -#include "config.h" #include #include #include @@ -30,10 +28,10 @@ #include #include #include -#include #include #include +#include #include #include @@ -90,8 +88,8 @@ static void test_rcu(void) rcu_read_lock(); rcu_read_unlock(); - node = malloc(sizeof(*node)); - assert(node); + node = (struct test_node *) malloc(sizeof(*node)); + urcu_posix_assert(node); call_rcu(&node->head, cb); @@ -165,7 +163,7 @@ static int do_fork(const char *execname) } } -int main(int argc, char **argv) +int main(int argc __attribute__((unused)), char **argv) { unsigned int i;