Commit 4aaaaade authored by Mark Andrews's avatar Mark Andrews
Browse files

silence warnings

parent f4f70bf5
......@@ -247,6 +247,11 @@ timeout(isc_task_t *task, isc_event_t *event) {
isc_event_free(&event);
}
static char one[] = "1";
static char two[] = "2";
static char xso1[] = "so1";
static char xso2[] = "so2";
int
main(int argc, char *argv[]) {
isc_task_t *t1, *t2;
......@@ -301,9 +306,9 @@ main(int argc, char *argv[]) {
RUNTIME_CHECK(isc_task_create(manager, 0, &t1) == ISC_R_SUCCESS);
t2 = NULL;
RUNTIME_CHECK(isc_task_create(manager, 0, &t2) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t1, my_shutdown, "1") ==
RUNTIME_CHECK(isc_task_onshutdown(t1, my_shutdown, one) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t2, my_shutdown, "2") ==
RUNTIME_CHECK(isc_task_onshutdown(t2, my_shutdown, two) ==
ISC_R_SUCCESS);
printf("task 1 = %p\n", t1);
......@@ -333,7 +338,7 @@ main(int argc, char *argv[]) {
/*
* Queue up the first accept event.
*/
RUNTIME_CHECK(isc_socket_accept(so1, t1, my_listen, "so1")
RUNTIME_CHECK(isc_socket_accept(so1, t1, my_listen, xso1)
== ISC_R_SUCCESS);
isc_time_settoepoch(&expires);
isc_interval_set(&interval, 10, 0);
......@@ -357,7 +362,7 @@ main(int argc, char *argv[]) {
&so2) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_socket_connect(so2, &sockaddr, t2,
my_connect, "so2") == ISC_R_SUCCESS);
my_connect, xso2) == ISC_R_SUCCESS);
/*
* Detaching these is safe, since the socket will attach to the
......
......@@ -58,6 +58,13 @@ my_tick(isc_task_t *task, isc_event_t *event) {
isc_event_free(&event);
}
static char one[] = "1";
static char two[] = "2";
static char three[] = "3";
static char four[] = "4";
static char foo[] = "foo";
static char bar[] = "bar";
int
main(int argc, char *argv[]) {
isc_taskmgr_t *manager = NULL;
......@@ -89,13 +96,13 @@ main(int argc, char *argv[]) {
RUNTIME_CHECK(isc_task_create(manager, 0, &t3) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_create(manager, 0, &t4) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t1, my_shutdown, "1") ==
RUNTIME_CHECK(isc_task_onshutdown(t1, my_shutdown, one) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t2, my_shutdown, "2") ==
RUNTIME_CHECK(isc_task_onshutdown(t2, my_shutdown, two) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t3, my_shutdown, "3") ==
RUNTIME_CHECK(isc_task_onshutdown(t3, my_shutdown, three) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t4, my_shutdown, "4") ==
RUNTIME_CHECK(isc_task_onshutdown(t4, my_shutdown, four) ==
ISC_R_SUCCESS);
timgr = NULL;
......@@ -104,13 +111,13 @@ main(int argc, char *argv[]) {
isc_interval_set(&interval, 1, 0);
RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_ticker, NULL,
&interval, t1, my_tick, "foo", &ti1) ==
&interval, t1, my_tick, foo, &ti1) ==
ISC_R_SUCCESS);
ti2 = NULL;
isc_interval_set(&interval, 1, 0);
RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_ticker, NULL,
&interval, t2, my_tick, "bar", &ti2) ==
&interval, t2, my_tick, bar, &ti2) ==
ISC_R_SUCCESS);
printf("task 1 = %p\n", t1);
......@@ -129,49 +136,49 @@ main(int argc, char *argv[]) {
* structure (socket, timer, task, etc) but this is just a test
* program.
*/
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "1",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, one,
sizeof(*event));
isc_task_send(t1, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "2",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, two,
sizeof(*event));
isc_task_send(t2, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "3",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, three,
sizeof(*event));
isc_task_send(t3, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "4",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, four,
sizeof(*event));
isc_task_send(t4, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "2",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, two,
sizeof(*event));
isc_task_send(t2, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "3",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, three,
sizeof(*event));
isc_task_send(t3, &event);
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, "4",
event = isc_event_allocate(mctx, (void *)1, 1, my_callback, four,
sizeof(*event));
isc_task_send(t4, &event);
isc_task_purgerange(t3,
......
......@@ -94,6 +94,10 @@ timeout(isc_task_t *task, isc_event_t *event) {
isc_task_shutdown(task);
}
static char one[] = "1";
static char two[] = "2";
static char three[] = "3";
int
main(int argc, char *argv[]) {
isc_taskmgr_t *manager = NULL;
......@@ -123,11 +127,11 @@ main(int argc, char *argv[]) {
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_create(manager, 0, &t3) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t1, shutdown_task, "1") ==
RUNTIME_CHECK(isc_task_onshutdown(t1, shutdown_task, one) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t2, shutdown_task, "2") ==
RUNTIME_CHECK(isc_task_onshutdown(t2, shutdown_task, two) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_task_onshutdown(t3, shutdown_task, "3") ==
RUNTIME_CHECK(isc_task_onshutdown(t3, shutdown_task, three) ==
ISC_R_SUCCESS);
printf("task 1: %p\n", t1);
......@@ -138,12 +142,12 @@ main(int argc, char *argv[]) {
isc_interval_set(&interval, 2, 0);
RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_once, NULL,
&interval, t2, timeout, "2", &ti2) ==
&interval, t2, timeout, two, &ti2) ==
ISC_R_SUCCESS);
isc_interval_set(&interval, 1, 0);
RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_ticker, NULL,
&interval, t1, tick, "1", &ti1) ==
&interval, t1, tick, one, &ti1) ==
ISC_R_SUCCESS);
isc_interval_set(&interval, 10, 0);
......@@ -151,7 +155,7 @@ main(int argc, char *argv[]) {
ISC_R_SUCCESS);
isc_interval_set(&interval, 2, 0);
RUNTIME_CHECK(isc_timer_create(timgr, isc_timertype_once, &expires,
&interval, t3, timeout, "3", &ti3) ==
&interval, t3, timeout, three, &ti3) ==
ISC_R_SUCCESS);
isc_task_detach(&t1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment