diff options
author | ae <ae@FreeBSD.org> | 2010-06-15 10:01:49 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2010-06-15 10:01:49 +0000 |
commit | 00535e15c061ad0a8df00b07ef5f0f9da5718902 (patch) | |
tree | a90a84e176d6fdb7160593b54446cf5afcc1b5c7 /gnu/lib | |
parent | 34eb8924c207302896f86653bf929b2a94f29642 (diff) | |
download | FreeBSD-src-00535e15c061ad0a8df00b07ef5f0f9da5718902.zip FreeBSD-src-00535e15c061ad0a8df00b07ef5f0f9da5718902.tar.gz |
Make all tests in libdialog compilable.
Fix coredump in menu3.c.
Approved by: kib (mentor)
Diffstat (limited to 'gnu/lib')
-rw-r--r-- | gnu/lib/libdialog/TESTS/check3.c | 4 | ||||
-rw-r--r-- | gnu/lib/libdialog/TESTS/menu3.c | 2 | ||||
-rw-r--r-- | gnu/lib/libdialog/TESTS/radio1.c | 4 | ||||
-rw-r--r-- | gnu/lib/libdialog/TESTS/radio3.c | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/gnu/lib/libdialog/TESTS/check3.c b/gnu/lib/libdialog/TESTS/check3.c index d97b804..f117bd6 100644 --- a/gnu/lib/libdialog/TESTS/check3.c +++ b/gnu/lib/libdialog/TESTS/check3.c @@ -47,13 +47,13 @@ static int spending; static int check(dialogMenuItem *self) { - return ((int)self->data == spending); + return ((int)(intptr_t)self->data == spending); } static int spend(dialogMenuItem *self) { - spending = (int)self->data; + spending = (int)(intptr_t)self->data; return DITEM_SUCCESS | DITEM_REDRAW; } diff --git a/gnu/lib/libdialog/TESTS/menu3.c b/gnu/lib/libdialog/TESTS/menu3.c index 4a29074..3a7a137 100644 --- a/gnu/lib/libdialog/TESTS/menu3.c +++ b/gnu/lib/libdialog/TESTS/menu3.c @@ -44,7 +44,7 @@ maybe(dialogMenuItem *self) static char *insurance[] = { "1,000,000", "Mondo insurance policy", "Off", "5,000,000", "Mega insurance policy", "Off", - "10,000,000", "Friend! Most Favored customer!" + "10,000,000", "Friend! Most Favored customer!", "On" }; static void diff --git a/gnu/lib/libdialog/TESTS/radio1.c b/gnu/lib/libdialog/TESTS/radio1.c index afcac1e..c4eeffd 100644 --- a/gnu/lib/libdialog/TESTS/radio1.c +++ b/gnu/lib/libdialog/TESTS/radio1.c @@ -31,13 +31,13 @@ static int spending; static int check(dialogMenuItem *self) { - return ((int)self->data == spending); + return ((int)(intptr_t)self->data == spending); } static int spend(dialogMenuItem *self) { - spending = (int)self->data; + spending = (int)(intptr_t)self->data; return DITEM_SUCCESS | DITEM_REDRAW; } diff --git a/gnu/lib/libdialog/TESTS/radio3.c b/gnu/lib/libdialog/TESTS/radio3.c index e11011c..2175358 100644 --- a/gnu/lib/libdialog/TESTS/radio3.c +++ b/gnu/lib/libdialog/TESTS/radio3.c @@ -31,13 +31,13 @@ static int spending; static int check(dialogMenuItem *self) { - return ((int)self->data == spending); + return ((int)(intptr_t)self->data == spending); } static int spend(dialogMenuItem *self) { - spending = (int)self->data; + spending = (int)(intptr_t)self->data; return DITEM_SUCCESS | DITEM_REDRAW; } |