Skip to content

Commit

Permalink
Cast NULL to uintptr_t when calling rust_task::start().
Browse files Browse the repository at this point in the history
On gcc 4.5.1 (fedora 14 i686) rust_test_runtime.cpp fails to compile
with the following error:

  rt/test/rust_test_runtime.cpp:57:61: error: passing NULL to non-pointer argument 3 of ‘void rust_task::start(uintptr_t, uintptr_t, uintptr_t, size_t)’

The explicit cast works around the error.
  • Loading branch information
rillian committed Oct 28, 2010
1 parent 679dca8 commit 3b3cd55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rt/test/rust_test_runtime.cpp
Expand Up @@ -54,7 +54,7 @@ rust_task_test::worker::run() {
kernel->create_domain(crate, "test");
rust_dom *domain = handle->referent();
domain->root_task->start(crate->get_exit_task_glue(),
(uintptr_t)&task_entry, NULL, 0);
(uintptr_t)&task_entry, (uintptr_t)NULL, 0);
domain->start_main_loop();
kernel->destroy_domain(domain);
}
Expand Down

0 comments on commit 3b3cd55

Please sign in to comment.